-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db: allow value block writing to be disabled
Previously there was no way to disable value blocks in table formats that supported value blocks. Now, it can be disabled using WriterOptions.DisableValueBlocks. This is never used by Pebble since we expect small sstables where the memory overhead of buffering value blocks in the sstable.Writer is acceptable. Informs cockroachdb/cockroach#117113
- Loading branch information
1 parent
27d566e
commit aba7c0c
Showing
6 changed files
with
70 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,32 @@ scan-cloned-lazy-values | |
3(in-place: len 4): bat3 | ||
4(lazy: len 5, attr: 5): vbat2 | ||
|
||
# Same data as previous, with disable-value-blocks set to true | ||
build disable-value-blocks=true | ||
[email protected]:a2 | ||
[email protected]:b5 | ||
[email protected]: | ||
[email protected]:bat3 | ||
[email protected]:vbat2 | ||
---- | ||
value-blocks: num-values 0, num-blocks: 0, size: 0 | ||
|
||
scan-raw | ||
---- | ||
a@2#1,1:in-place a2, same-pre false | ||
b@5#7,1:in-place b5, same-pre false | ||
b@4#3,0: | ||
b@3#2,1:in-place bat3, same-pre false | ||
b@2#1,1:in-place vbat2, same-pre true | ||
|
||
scan | ||
---- | ||
a@2#1,1:a2 | ||
b@5#7,1:b5 | ||
b@4#3,0: | ||
b@3#2,1:bat3 | ||
b@2#1,1:vbat2 | ||
|
||
# Size of value index is 3 bytes plus 5 + 5 = 10 bytes of trailer of the value | ||
# block and value index block. So size 33 - 13 = 20 is the total size of the | ||
# values in the value block. | ||
|
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