-
Notifications
You must be signed in to change notification settings - Fork 455
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
Add support for reading from snapshot files #757
Merged
Merged
Changes from 134 commits
Commits
Show all changes
141 commits
Select commit
Hold shift + click to select a range
8f75e2f
Update comment
111965b
Add volume index to reader open options matcher
86e721a
Add support for writing out snapshot files in writeTestData
01f2705
Add mostRecentCompleteSnapshotTimeByBlockShard function
b03d8e0
Refactor mostRecentCompleteSnapshotTimeByBlockShard
ba94645
Add minimumMostRecentSnapshotTimeByBlock function
72de5b6
Make latestVolumeForBlock guarantee checkpoint file exists
38ff719
Add bootstrapAvailableSnapshotFiles function
dfec454
Set initial injected function in commitlog bootstrapper
21479ee
Add SnapshotTime function and test
954ac66
Add SnapshotTime fn to commit log source constructor
9efda1a
Add test case for merging snapshot files and commit log files
20b23e0
Working read snapshot code
19c8dd7
passing prop test - data only
3456c7c
Fix index ns options in prop test
082ce98
Use random seed
fb6755e
remove prints
2caa8f5
Simplify and improve commit log filtering logic + add logs and improv…
8b27128
Dont read own commit logs
43d3872
Check immutable blocks for snapshots too
27f2817
Cleanup
7e701b6
Passing prop test with force merge
d398b9c
Delete unused code
b4e1ff2
verify checksum on bootstrap
e61afa0
Add integration test
389cdfc
Fix broken integration test
e7e1b1b
Fix broken integration test
eb44d91
Fix dtest compilation issue
1c6c525
Fix lint issues
40b7fc4
Fix lint issues
ab8beb4
Fix import orders
d44b46c
Remove prints from tests
1631bb8
Mark prop test as big
b396208
re-enable test
8533aa3
Fix broken test
5454d9b
Prop test passing with index
79fde45
Refactor to share more code
66af6a3
Factor out commit log predicate into helper
8e65b52
Factor out newReadCommitLogPredBasedOnAvailableSnapshotFiles
a08706b
Use snapshot files to generate commit log predicate for bootstrapping…
117653b
Delete old commit log pred generation code + tests + calculate correc…
95a847d
Refactor read index to only read necessary commit log files
f95fb54
Mark prop test as big
83ef7bb
Refactor readers slice constructruction to put snapshot data first an…
d6846c4
Refactor passing pools between functions and use encoder.Discard() in…
7bab886
remove encoders type and dont double close
88c656f
Pass legs args to function and refactor
8a1575d
Fix typo
af17969
More cleanup
f251b5f
Delete TODO
1c95f76
Delete another todo
f422e07
Time merge
8add7a3
Factor out bootstrapAvailableSnapshotFiles helper into internal
c09b189
Bootstrap snapshot files on-demand to save mem
906b413
Check commit log iter error
8c5c7a1
Implement and use block.Discard()
a92ce17
Dont double close block
fd87507
Remove tmpctx
2f8372e
More refactoring
dda20aa
Finalize ID and Tags when possible
15383f6
Reuse IDs/tags accross blocks for snapshots
b2af541
Revert bad commit
a14ce7c
Add TODO
c6c02b2
Undo changes to read_data_files
25bf972
regen mocks
fa1cc4c
Reformat comments
0fe5b31
Update comment;
c0321fa
Add comment
7c87d5d
Add period in comment
b90e5e3
Fix comment
f0d7720
Estimate shard result size
afd9ca0
Delete commented out code
07fde10
Factor our bootstrap of shard/block into helper func
fe59f16
Delete TODO
ad092a7
Propagate mostRecentCompleteSnapshotByBlockShard
c58c5e6
Refactor to propagate snapshot files to read around instead of just r…
40e727f
Remove TODOs
5fc018e
Improve comment
494ac82
Delete caching mechanism
93284ff
Refactor ReadIndex to bootstrap one snapshot file at a time, and dele…
03db28b
Fix comment spacing
7ec517d
Rename helper fn
a163e95
Dont read data / calculate checksums if were just bootstrapping the i…
e1852d5
Optimize tagsFromTagsIter
e614a36
Remove TODO
fecaa93
Mark ID and Tags as no finalize
36e0473
Remove TODO
7fd8742
Add TODO
df2ba46
Clarify TODO
9ced9ad
Replace panic with proper error handling
eca74a9
Rename helper fn for clarify
3881953
Rename helper fn for clarity
2c6b2ab
Remove TODO
d612302
Remove panic
0b6a135
Remove panic
c8eed4d
Add TODO
53e0701
Add TODO
819a9f9
Clarify index bootstrapping comments
6bdce00
Replace map keyed by unique idx with genny map
21fbeef
Improve error handling
e00241a
Remove todo
914c6b5
Add logger
29dbf98
Move tagsFromTagsiter to shared location
845be94
Add test for TagsFromTagsIter
4452b38
Reuse TagsFromTagsIter in shard.go
7eee44d
Fix broken integration test
990b4f9
Remove todo
cde3e5a
Refactor function lint
bb81e1f
Remove TODO
3137efc
Fix broken unit test
ff75311
Remove TODO
3329b71
Add comment
cb6da77
Clarify comment
17679f4
Refactor for readability
9d518dc
Mark prop test as big
9d94a44
Add concrete examples for bootstrapping logic
c0a9f28
Fix comments whitespace
777d55f
Fix lint issues
ef02320
Add regression test for unique idx bug
6ad08c4
Address PR feedback
aa03bd0
Add mixed mode read write test for snapshots
200cbaa
Refactor SnapshotFiles to return snapshot time
743dc60
Simplify files interfaces
08c86d8
Refactor bootstrapper to use new SnapshotTime stuff
aa349b3
Refactor for additional assertions
6a97e8a
Only decode tags if weve never seen them before
b27b4df
Fix logic for determinig when we should decode tags
2226b90
Remove TODOs
7ce1f03
Add comment and no finalize id/tags
b6a976d
Remove TODO
e26849d
Delete unused func
255b0e7
Mark prop test as big
1e21c50
Fix broken unit tests
68c968f
Infer default bufio reader size
68e57d3
Clarify logic and improve prop test
66a9644
Print time as string instead of unix timestmap
10d4e8a
Address comments
0f41cbc
Fix bug in new shardEntry
32f60fa
Fix bug in shard.go
b463402
mark prop test as big
da6a8ea
Fix unit tes
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
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
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.
Add a regression test for unique index thing
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.
Add mixed_mode equivalent integration test
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.
done (adding regression test for unique index bug)
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.
done (adding mixed_mode equivalent integration test)