During migration from HBase 0.90.6 to 0.94.6 we found changed behaviour in how major compact handles delete markers with timestamps in the future. Before
HBASE-4721 major compact purged deletes regardless of their timestamp. Newer versions keep them in HFile until timestamp not reached.
I guess this happened due to new check in ScanQueryMatcher EnvironmentEdgeManager.currentTimeMillis() - timestamp) <= timeToPurgeDeletes.
This can be worked around by specifying large negative value in hbase.hstore.time.to.purge.deletes option, but, unfortunately, negative values are pulled up to zero by Math.max in HStore.java.
Maybe, we are trying to do something weird by specifing delete timestamp in future, but
HBASE-4721 definitely breaks old behaviour we rely on.
Steps to reproduce this:
Before major_compact we have two hfiles with the following:
After major compact we get the following:
In our installation, we resolved this by removing Math.max and setting hbase.hstore.time.to.purge.deletes to Integer.MIN_VALUE, which purges delete markers, and it looks like a solution. But, maybe, there are better approach.