You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Andrew Kyle Purtell (Jira)" <ji...@apache.org> on 2022/06/12 17:33:00 UTC
[jira] [Updated] (HBASE-21572) The "progress" object in "Compactor" is not thread-safe, this may cause the misleading progress information on the web UI.
[ https://issues.apache.org/jira/browse/HBASE-21572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Kyle Purtell updated HBASE-21572:
----------------------------------------
Fix Version/s: (was: 3.0.0-alpha-3)
Assignee: (was: lixiaobao)
Resolution: Duplicate
Status: Resolved (was: Patch Available)
We resolved this issue while working on StoreFileTracker.
> The "progress" object in "Compactor" is not thread-safe, this may cause the misleading progress information on the web UI.
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-21572
> URL: https://issues.apache.org/jira/browse/HBASE-21572
> Project: HBase
> Issue Type: Bug
> Components: Compaction, UI
> Affects Versions: 1.2.0, 3.0.0-alpha-1, 1.3.0, 1.4.0, 2.1.0, 2.0.0
> Reporter: lixiaobao
> Priority: Major
> Attachments: HBASE-21572.patch
>
>
> when setting the compaction thread number more than 1, on the store, there may be multiple threads on the region server using "compactor" of the "store" to execute the compaction . However, the "progress" object in "Compactor" is not thread-safe, this may cause the misleading progress information on the web UI.
> The problem is:
> # If the memstore frequent flush , there may be two or more compaction request on one store, however, one "store" has one "compactor" and one "compactor" has one "progress",when two threads execute compaction on one store ,the code below may have some problem."progress" will be override by lastest thread.
> {code:java}
> this.progress = new CompactionProgress(fd.maxKeyCount);{code}
> # The code below may also case thread-safe problem when two or more threads execute compaction on one store
> {code:java}
> ++progress.currentCompactedKVs;
> progress.totalCompactedSize += len;{code}
> solutions:
> # I create a list of "CompactionProgress" in the "compactor" ,every thread execute compaction just add progress to the list,when complete remove "progress" in the list.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)