Duo Zhang created HBASE-26675: --------------------------------- Summary: Data race on Compactor.writer Key: HBASE-26675 URL: https://issues.apache.org/jira/browse/HBASE-26675 Project: HBase Issue Type: Bug Components: Compaction Reporter: Duo Zhang Assignee: Duo Zhang
In Compactor.getCompactionTargets, we use synchronized on the writer instance but it does not help resolve the data race problem, because in other places we do not use synchronized... And since it is not a big deal to the upper layer an old snapshot, we could just make the writer instance volatile and use it directly in the method, just make sure we always use the same instance in the method, i.e, assign it to a local var first. -- This message was sent by Atlassian Jira (v8.20.1#820001)