-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
area/docdbYugabyteDB core featuresYugabyteDB core featureskind/enhancementThis is an enhancement of an existing featureThis is an enhancement of an existing feature
Description
Currently, once a tablet splits, both of it's children will essentially have access to all of the rocksdb sst files, as hardlinks. However, all of these files will have metadata saying that either the first half, or the second half is irrelevant. This metadata will go away, as these files get compacted and new ones get generated, as we'll essentially throw away the irrelevant data from the input files.
This brings a couple of interesting challenges and improvement opportunities
- We cannot split child tablets again, until all of their SST files have been compacted (so that the metadata gets wiped).
We could change this easily by just triggering a compaction asap, after a split. - When doing compactions, we actually read through all of the data in the SST files. For the files with split metadata, half this work is useless, since we will throw away that data anyway.
We could enhance this by realizing the input file is a split file and then either seek past the first half, or stop reading after the first half accordingly. - After doing a split, likely the LB will kick in and try to move data around, as you'll now have +1 tablet on the relevant nodes, that had peers of this tablet. This is undesirable as we'll be moving a lot of data around, which is already 2x larger than needed (due to compactions not having happened yet).
We could augment the LB logic to not move around child tablets, until they're fully compacted -- note that this might be slightly more complicated, as we might need quite a bit more metadata flowing around from TS>master, for the LB to act on this.
cc @ttyusupov
Metadata
Metadata
Assignees
Labels
area/docdbYugabyteDB core featuresYugabyteDB core featureskind/enhancementThis is an enhancement of an existing featureThis is an enhancement of an existing feature