Open es1024 opened 2 years ago
@es1024 for the compaction note, are you waiting out the 15min history retention interval? we will not clean up tombstones during that window, as we might have active sessions reading at older times
High latencies appear to persist even after triggering a compaction on both the table and index
@bmatican Yes -- I tried doing INSERT + DELETE, then compacting both table and index several hours later, with the following result:
> yb-admin compact_table ysql.yugabyte test_col_idx
Compacted [yugabyte.test_col_idx] tables.
> yb-admin compact_table ysql.yugabyte test
Compacted [yugabyte.test] tables.
> ysqlsh
ysqlsh (11.2-YB-2.15.3.0-b0)
Type "help" for help.
yugabyte=# \timing on
Timing is on.
yugabyte=# select * from test;
key | col
-----+-----
(0 rows)
Time: 109.477 ms
yugabyte=# select * from test where col = '00000000-0000-0000-0000-000000000000';
key | col
-----+-----
(0 rows)
Time: 4889.215 ms (00:04.889)
yugabyte=#
So the high latencies on the index persist even after compaction on both table and index.
@es1024 --
Not sure if compactions trigger a flush. But if not, can you try flushing the index and the table, and then triggering compactions? And the compaction must be done after retention interval has elapsed (as you did before).
CC: @bmatican , @rthallamko3
@kmuthukk I think compactions should trigger a flush - we send a FlushTables request with is_compaction=true to trigger a compaction. In any case, I tried flushing both index/table, then triggering a compaction on the same cluster as before and latencies remain unchanged.
Jira Link: DB-3401
Description
Given the following schema:
If one inserts and deletes rows with the same value for
col
, e.g.repeatedly, then any read on the index with that value will experience high latency (proportional to the number of rows ever inserted):
High latencies appear to persist even after triggering a compaction on both the table and index, but disappear if the index is recreated.