Subject: Cacheblocksonwrite not working during compaction?

>>- Why is the not seeming to work? Does it
only work for flushing and not for compaction? I can see from the logs that
the file is renamed >>after being written. Does that have something to do
with why cacheblocksonwrite isn't working?

Generally, it is a very bad idea to enable caching on read/write during
compaction unless your cache size is larger than your data size (which is
 not a common case).
Cache invalidation during compaction is almost inevitable thing, due to a
complexity of a potential optimizations in this case. Actually, there are
some works (papers) on the Internet particularly dedicated to a smarter
cache invalidation algorithms for a LSM - derived storage engines, but
engineers, as usual, much more conservative than academia researches and
are not eager to implement novel (not battle tested) algorithms.
Latency spikes during compaction are normal and inevitable things, at least
for HBase and especially, when one deals with S3 or any other cloud
storage. S3 read latency can reach seconds sometimes and the only possible
mitigation for this huge latency spikes is a very-smart-cache
-invalidation-during-compaction algorithm (which does not exist yet).

For your case, I would recommend the following settings:



*CACHE_DATA_BLOCKS_ON_WRITE_KEY = false (bad idea to set it to true)*
 PREFETCH_BLOCKS_ON_OPEN should be false as well, unless your table is
small and your application does this on startup (once)

On Fri, Sep 20, 2019 at 12:51 PM Jacob LeBlanc <[EMAIL PROTECTED]>