zhuyaogai commented on code in PR #5507:
URL: https://github.com/apache/hbase/pull/5507#discussion_r1413012164
##########
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestAsyncLogRolling.java:
##########
@@ -51,6 +60,56 @@ public static void setUpBeforeClass() throws Exception {
AbstractTestLogRolling.setUpBeforeClass();
}
+ public static class SlowSyncLogWriter extends AsyncProtobufLogWriter {
+
+ public SlowSyncLogWriter(EventLoopGroup eventLoopGroup, Class<? extends
Channel> channelClass) {
+ super(eventLoopGroup, channelClass);
+ }
+
+ @Override
+ public CompletableFuture<Long> sync(boolean forceSync) {
+ try {
+ Thread.sleep(syncLatencyMillis);
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ return super.sync(forceSync);
Review Comment:
@Apache9 I really appreciate your guidance, and I have made the changes.
Please check if it meets your requirements.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]