chore: loadShards changes to more cleanly support 2.x feature #25556
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
chore: loadShards changes to more cleanly support 2.x feature (chore: loadShards changes to more cleanly support 2.x feature #25513)
chore: move shardID parsing and shard filtering into walkShardsAndProcess
chore: make it impossible to miss sending shardResponse or marking shard as complete
chore: always count number of shards (preparation for 2.x related feature)
chore: explicitly load series files and create indices serially
Explicitly load series files and create indices serially. Also avoid passing them to work functions that don't need them.
chore: rework loadShards for changes necessary to cancel loading process
chore: comment improvements
fix: fix race conditions in TestStore_StartupShardProgress and TestStore_BadShardLoading
chore: avoid logging nil error
chore: refactor shard loading and shard walking
Refactor loadShards and CreateShard to use a common shardLoader class that makes thread-safety easier. Refactor walkShardsAndProcess into findShards.
chore: improve comment
chore: rename OpenShard to ReopenShard and implement with shardLoader
Rename Store.OpenShard to Store.ReopenShard and implement using a shardLoader object. Changes to tests as necessary.
Avoid resetting shard options when reopening a shard. Proper mutex locker in Shard.ReopenShard.
chore: fix formatting issue
chore: warn on mixed index types in Store.CreateShard
chore: change from info to warn when invalid shard IDs found in path
chore: use coarser locking in Store.ReopenShard
chore: fix typo in comment
chore: code simplification
(cherry picked from commit 0bc167b)
Fix reporting shards not opening correctly when they actually did. Fix race condition with logging in loadShards.
(cherry picked from commit 65683bf)
Remove unnecessary fmt.Sprintf calls for static code checks in main-2.x.
(cherry picked from commit 8497fbf)
chore: remove unnecessary blank identifier
chore: remove unnecessary blank identifier
(cherry picked from commit 5c7479e)
Closes: #25555
Closes #
Describe your proposed changes here.