Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixes for index upgrade from PTable V1 to V2 or later #1504

Merged
merged 1 commit into from Dec 4, 2017

Conversation

@shaan1337
Copy link
Member

shaan1337 commented Dec 1, 2017

Thanks to @lscpike for finding these bugs 馃憤

i) Bugfix that may cause PTable enumeration to end earlier when upgrading hashes (failing test provided by @lscpike in #1501):

If an empty list is returned in ReadUntilDifferentHashes(), the list enumerator in MoveNext() will return false and PTable enumeration will stop earlier than it should.

ii) Bugfix that may cause PTable entries with collision to become out of order (test added in table_index_hash_collision_when_upgrading_to_64bit):
The last IndexEntry in the list returned by ReadUntilDifferentHashes() corresponds to the next stream hash group. Thus, that IndexEntry will be returned earlier during enumeration and will be merged earlier.
If that IndexEntry corresponds to a stream hash which has collisions, it might not be at the correct position after merge (if it should be later in the file after sorting index entries)

@shaan1337 shaan1337 changed the title Bugfixes for index upgrade from PTable Version 1 to V2 or later Bugfixes for index upgrade from PTable V1 to V2 or later Dec 1, 2017
@shaan1337 shaan1337 force-pushed the fix-index-enumerator-bug branch from e599b1d to a722f10 Dec 1, 2017
鈥ing hashes (test provided by @lscpike):

If an empty list is returned in ReadUntilDifferentHashes(), the list enumerator in MoveNext() will return false and PTable enumeration will stop earlier than it should.

ii) Bugfix that may cause PTable entries with collision to become out of order (test added):
The last IndexEntry in the list returned by ReadUntilDifferentHashes() corresponds to the next stream hash group
Thus, that IndexEntry will be returned earlier during enumeration and will be merged earlier.
If that IndexEntry corresponds to a stream hash which has collisions, it might not be at the correct position (if it should be later in the file after sorting index entries)
@shaan1337 shaan1337 force-pushed the fix-index-enumerator-bug branch from a722f10 to 56de02d Dec 4, 2017
@hayley-jean hayley-jean merged commit 3ed8815 into release-v4.0.4 Dec 4, 2017
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
wercker/build-mono4 Wercker pipeline passed
Details
@hayley-jean hayley-jean deleted the fix-index-enumerator-bug branch Dec 4, 2017
hayley-jean added a commit that referenced this pull request Dec 4, 2017
Bugfixes for index upgrade from PTable V1 to V2 or later
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.