There are a large number of oldwal files in the oldwal directory, and the default value of hbase.master.logcleaner.ttl is 10 minutes. Upon observation, it has been noticed that no oldwal files have been cleared.
Through analyzing the source code, it has been discovered that the following logic contains a problem. When LogCleaner executes the checkAndDeleteFiles method, it calls the getDeletableFiles method of ReplicationLogCleaner. One of the logics in this method is that if canFilter is false, it will directly return Collections.emptyList(), which means that the wal data filtered out by TimeToLiveLogCleaner will be filtered out. This in turn leads to the files under oldwal not being able to be cleared.