Details
-
Improvement
-
Status: Resolved
-
Normal
-
Resolution: Duplicate
-
None
-
None
-
2.0.11
Description
During compaction and repairs with many tombstones an exorbitant amount of time is spend in RangeTombstone.Tracker.isDeleted().
The amount of time spend there can be so big that compactions and repairs look "stalled" and the time remaining time estimated frozen at the same value for days.
Using visualvm I've been sample profiling the code during execution and both in Compaction as well as during repairs found this. (point in time backtraces attached)
Looking at the code the problem is obviously the linear scanning:
public boolean isDeleted(Column column) { for (RangeTombstone tombstone : ranges) { if (comparator.compare(column.name(), tombstone.min) >= 0 && comparator.compare(column.name(), tombstone.max) <= 0 && tombstone.maxTimestamp() >= column.timestamp()) { return true; } } return false; }
I would like to propose to change this and instead use a sorted list (e.g. RangeTombstoneList) here instead.
Attachments
Attachments
Issue Links
- duplicates
-
CASSANDRA-9486 LazilyCompactedRow accumulates all expired RangeTombstones
- Resolved
- is duplicated by
-
CASSANDRA-8961 Data rewrite case causes almost non-functional compaction
- Resolved