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.
- The code below may also case thread-safe problem when two or more threads execute compaction on one store
- 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.