[Segment Replication] Replicate *.liv file may cause performance issue #3929
Labels
enhancement
Enhancement or improvement to existing feature or request
Indexing:Replication
Issues and PRs related to core replication framework eg segrep
In document replication scenario, *.liv file are only be written to disk when flush operation (Lucene commit) is performed. But in segment replication, the *.liv file must be written every refresh (by setting
writeAllDeletes
to true inDirectoryReader#open
method).It may not cause any problem in append-only scenario (no delete will be issued in old segment). But in update scenario, as long as there is a delete operation performed in old segment, primary shard's
refresh
will write fullliv
bitmap
to disk and replicate to replica shard.*.liv
file may be very large in some merged segment (for example*.liv
file for a segment with 16,000,000 docs takes up ~2MB disk space). Differ with segment data file, we cannot reuse old*.liv
file when new*.liv
file is generated, even if only one doc is deleted in segment, we must replicate the full*.liv
file. So in segrep, write and replicate*.liv
file may introduce greater network and CPU (write and load*.liv
file) load.Several ways to fix this issue:
bitmap
whenrefresh
is performedThe text was updated successfully, but these errors were encountered: