-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
store: Fixed binary header bug that was causing all postings to be ke…
…pt in memory instead of 1/32 as we meant. (#2390) * store: Fixed binary header bug that was causing all postings to be kept in memory instead of 1/32 as we meant. Spotted by @mkabischev! Thanks to you and @d-ulyanov as well! Epic finding +1 Test output before fix: testutil.Equals(t, 1, br.version) testutil.Equals(t, 2, br.indexVersion) testutil.Equals(t, &BinaryTOC{Symbols: headerLen, PostingsOffsetTable: 66}, br.toc) testutil.Equals(t, int64(626), br.indexLastPostingEnd) testutil.Equals(t, 8, br.symbols.Size()) testutil.Equals(t, map[string]*postingValueOffsets{ "": { offsets: []postingOffset{{value: "", tableOff: 4}}, lastValOffset: 392, }, "a": { offsets: []postingOffset{ {value: "1", tableOff: 9}, {value: "11", tableOff: 16}, {value: "12", tableOff: 24}, {value: "2", tableOff: 32}, {value: "3", tableOff: 39}, {value: "4", tableOff: 46}, {value: "5", tableOff: 53}, {value: "6", tableOff: 60}, {value: "7", tableOff: 67}, {value: "8", tableOff: 74}, {value: "9", tableOff: 81}, }, lastValOffset: 572, }, "longer-string": { offsets: []postingOffset{{value: "1", tableOff: 88}}, lastValOffset: 622, }, }, br.postings) testutil.Equals(t, 0, len(br.postingsV1)) testutil.Equals(t, 2, len(br.nameSymbols)) Signed-off-by: Bartlomiej Plotka <[email protected]> * Added CHANGELOG item. Signed-off-by: Bartlomiej Plotka <[email protected]> * Fixed build errs. Signed-off-by: Bartlomiej Plotka <[email protected]> * Addressed Lucas comment. Signed-off-by: Bartlomiej Plotka <[email protected]>
- Loading branch information
Showing
7 changed files
with
100 additions
and
44 deletions.
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
Oops, something went wrong.