db: genericize rangeDel{Cache,Frags} into keySpan{Cache,Frags}#1356
db: genericize rangeDel{Cache,Frags} into keySpan{Cache,Frags}#1356jbowens merged 1 commit intocockroachdb:masterfrom
Conversation
sumeerbhola
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @jbowens)
mem_table.go, line 371 at r1 (raw file):
return nil } return frags.get(c.skl, c.cmp, c.formatKey)
Can't the code in this method extract these from m like the callee used to do, and then call frags.get. I am trying to understand why we need the member variables in keySpanCache.
Or is this just the first step in the refactor and get will eventually not take a memTable parameter. Should it be removed now itself, since it is unused?
Rename the memtable's `rangeDelCache` and `rangeDelFrags` types to `keySpanCache` and `keySpanFrags` so they may be used for caching range key fragments too. In addition to the pure renames, I made a small refactor to decouple the dependency on `memTable.tombstones` by adding a pointer to the skiplist to a `keySpanCache` field.
jbowens
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @sumeerbhola)
mem_table.go, line 371 at r1 (raw file):
Previously, sumeerbhola wrote…
Can't the code in this method extract these from
mlike the callee used to do, and then callfrags.get. I am trying to understand why we need the member variables inkeySpanCache.Or is this just the first step in the refactor and
getwill eventually not take amemTableparameter. Should it be removed now itself, since it is unused?
Oops, yeah, I forgot to remove the memTable parameter when extracting this change from another branch. Thanks :)
sumeerbhola
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @sumeerbhola)
jbowens
left a comment
There was a problem hiding this comment.
TFTR!
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @sumeerbhola)
Rename the memtable's
rangeDelCacheandrangeDelFragstypes tokeySpanCacheandkeySpanFragsso they may be used for caching rangekey fragments too.
In addition to the pure renames, I made a small refactor to decouple the
dependency on
memTable.tombstonesby adding a pointer to the skiplistin a
keySpanCachefield.