[ 
https://issues.apache.org/jira/browse/HBASE-30255?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Duo Zhang resolved HBASE-30255.
-------------------------------
    Fix Version/s: 2.7.0
                   3.0.0-beta-2
                   2.5.16
                   2.6.7
     Hadoop Flags: Reviewed
       Resolution: Fixed

Pushd to all active branches.

Thanks [~liuxiaocs] and [~paksyd] for reviewing!

> Async archiving wal file causes TestLogRolling flaky
> ----------------------------------------------------
>
>                 Key: HBASE-30255
>                 URL: https://issues.apache.org/jira/browse/HBASE-30255
>             Project: HBase
>          Issue Type: Sub-task
>          Components: test, wal
>            Reporter: Duo Zhang
>            Assignee: Duo Zhang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.7.0, 3.0.0-beta-2, 2.5.16, 2.6.7
>
>
> {code}
>     if (logsToArchive != null) {
>       final List<Pair<Path, Long>> localLogsToArchive = logsToArchive;
>       // make it async
>       for (Pair<Path, Long> log : localLogsToArchive) {
>         logArchiveExecutor.execute(() -> {
>           archive(log);
>         });
>         this.walFile2Props.remove(log.getFirst());
>       }
>     }
> {code}
> Here we will use a logArchiveExecutor to archive the wal file, and in the 
> archive method we will decrease the log file size, but the removal from 
> walFile2Props is done in foreground, so the assertion in TestLogRolling is 
> flaky
> {code}
>     // should have deleted all the rolled wal files
>     TEST_UTIL.waitFor(5000, () -> 
> AbstractFSWALProvider.getNumRolledLogFiles(log) == 0);
>     assertEquals(0, AbstractFSWALProvider.getLogFileSize(log));
> {code}
> As when num rolled fles reaches zero, the log file size may not be decreased 
> yet.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to