-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check entry empty state to ensure GC eligible #3634
Merged
rallen090
merged 37 commits into
r/index-active-block
from
ra/index-active-block-flush-state
Aug 19, 2021
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
de7e6b9
WIP - refactor flush state marking to occur after index flush
rallen090 9fc4934
WIP - remove unused ns marking func
rallen090 e19a2ac
WIP - do not remove from index if series not empty
rallen090 ca70206
WIP - remove flushed block checks
rallen090 6a2eaf1
Cleanup 1
rallen090 5f1be6c
Mock gen
rallen090 de4c165
Fix tests 1
rallen090 f3117c9
Fix TestBlockWriteBackgroundCompact
rallen090 6568044
Lint
rallen090 7c1f06c
WIP - fix index flush conditions
rallen090 75842e3
WIP - fix index flush conditions 2
rallen090 ee6e6ea
Add test to verify warm flush ordering
rallen090 db5552f
Lint
rallen090 18984ca
Merge remote-tracking branch 'origin/r/index-active-block' into ra/in…
rallen090 1e81687
Experimental index flush matching
rallen090 8344c17
Use maps for shard flushes
rallen090 c6c3b4f
Mark flushed shards based on block size
rallen090 0b28fe7
Fixup shard marking logic
rallen090 3bf7412
Mock
rallen090 dd4dd0a
Fix test
rallen090 4084517
Fix test TestFlushManagerNamespaceIndexingEnabled
rallen090 f83f864
Lint
rallen090 e80e383
Add RelookupAndCheckIsEmpty
rallen090 db170c5
Mock
rallen090 db0b9c1
Fix OnIndexSeries ref type
rallen090 b2a016c
Cleanup feedback
rallen090 5c5d6e0
Fixing tests 1
rallen090 a4e1f0a
Fixing tests 2
rallen090 b5b3713
Mock
rallen090 cdcab19
Lint
rallen090 cad7fcd
More fixing tests 1
rallen090 7070278
Lint
rallen090 45e9a92
Split warm flush status into data and index
rallen090 3e58b36
Fix tests
rallen090 548591f
Fixing tests
rallen090 c68120b
Fixing tests 2
rallen090 6651096
For bootstrapping just use presence of datafiles
rallen090 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, IIUC,
blockStartsFromIndexBlockStart
returns data block starts between index block start and index block start + index block size. This is important because index block size >= data block size. If that's true, why do we need toMarkWarmIndexFlushStateSuccessOrError
for each data block start time?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct. And the reason is because
MarkWarmIndexFlushStateSuccessOrError
is still marking data blockStarts (not index blockStarts), but each block now just have a flag for both data and index. This is because the state we are tracking is always still at the data block size not index block size. Eg we have 1h block and 2h indexBlock. In-mem we now have:where determining if a given block is eligible for GC we check both
dataFlushed && indexFlushed
. So when an index flush occurs, that actually in this case covers 2 blocks.This is a somewhat confusing nuance though so if you have any suggestions are making this easier to understand let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, may be worth adding a comment here just clarify