-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
It is documented that key{Above|Below}Watermark only applies to the optimistic chunker. We should add it to the composite chunker with restrictions:
- Only applies to key[0].
- Only applies when key[0] is numeric (initially, we could relax this in future).
The relevant code is:
spirit/pkg/table/chunker_composite.go
Lines 480 to 490 in 30d3e41
| // KeyAboveHighWatermark is not yet supported for composite chunker. | |
| // See: https://github.com/block/spirit/issues/479 | |
| func (t *chunkerComposite) KeyAboveHighWatermark(key0 any) bool { | |
| return false | |
| } | |
| // KeyBelowLowWatermark is not yet supported for composite chunker. | |
| // See: https://github.com/block/spirit/issues/479 | |
| func (t *chunkerComposite) KeyBelowLowWatermark(key0 any) bool { | |
| return true | |
| } |
The advantage of implementing this feature is as follows:
- For KeyAbove it eliminates some changes needing to be applied. This may be less important compared to auto_inc tables, because users are less likely to be inserting/modifying data at the end of the key range.
- For KeyBelow it delays applying changes until after the copier is guaranteed to be past that point. This can be really useful in preventing contention cases (deadlocks, lock waits), which have been observed a few times between applier and copier.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request