[GitHub] [hbase] comnetwork commented on pull request #4721: HBASE-27231 FSHLog should retry writing WAL entries when syncs to HDF…
comnetwork commented on PR #4721: URL: https://github.com/apache/hbase/pull/4721#issuecomment-1304543014 @Apache9 , ok ,I will try to keep the changes within the FSHLog. -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [hbase] comnetwork commented on pull request #4721: HBASE-27231 FSHLog should retry writing WAL entries when syncs to HDF…
comnetwork commented on PR #4721: URL: https://github.com/apache/hbase/pull/4721#issuecomment-1232405947 @Apache9 , would you mind review the comments again and give some suggestions at your convenience ? -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [hbase] comnetwork commented on pull request #4721: HBASE-27231 FSHLog should retry writing WAL entries when syncs to HDF…
comnetwork commented on PR #4721: URL: https://github.com/apache/hbase/pull/4721#issuecomment-1228380175 After I read the `FSHLog` code in current master,2.x, 1.x and 0.98, I find there are always existing a single-thread consumer to call blocking `ProtobufLog.append`(eg. in master `FSHLog.RingBufferEventHandler` corresponding to `AsyncFSWAL.consumeExecutor` calls `ProtobufLog.append` in its single-thread `onEvent` method), the problem you describe already exists in `FSHLog`. One possible solution I can think of is to wrap `FSDataOutputStream` with a new `BufProtobufLogWriter` in a similar way to `AsyncProtobufLogWriter`, we just write to the internal `ByteBuffer` of `BufProtobufLogWriter` in `consumeExecutor`. When `BufProtobufLogWriter.sync` is called, we use a single-thread `FSWriter` to invoke `FSOutputStream.write`and this single-thread `FSWriter` use multiple SyncRunners to invoke `FSDataOutputstream.hflush`. `FSDataOutputstream.write` may also block this single single-thread `FSWriter`,so the queue between `consumeExecutor` and `FSWriter` is also likely to be full, once the queue is full, we could fail the sync requests and then execute syncFailed logic to retry. -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [hbase] comnetwork commented on pull request #4721: HBASE-27231 FSHLog should retry writing WAL entries when syncs to HDF…
comnetwork commented on PR #4721: URL: https://github.com/apache/hbase/pull/4721#issuecomment-1228364454 After I read the FSHLog code in current master,2.x, 1.x and 0.98, I find they always has a single-thread consumer to call blocking `ProtobufLog.append`(eg. in master `FSHLog.RingBufferEventHandler` corresponding to `AsyncFSWAL.consumeExecutor` calls `ProtobufLog.append` in its single-thread onEvent method), the problem you describe always exists in `FSHLog`. One possible solution I can think of is to wrap FSOutputStream with a BufProtobufLogWriter in a similar way to AsyncProtobufLogWriter. In consumeExecutor just written to the internal BufProtobufLogWriter ByteBuffer, BufProtobufLogWriter when needed. The sync, The FSoutputStream.write will be synched by SyncRunner. Fsoutputstream.write may also block a single thread. So between the FSWriter and consumeExecutor queue is likely to be full, once the queue is full, can let call BufProtobufLogWriter. Sync request fails, then execute syncFailed logic -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [hbase] comnetwork commented on pull request #4721: HBASE-27231 FSHLog should retry writing WAL entries when syncs to HDF…
comnetwork commented on PR #4721: URL: https://github.com/apache/hbase/pull/4721#issuecomment-1223944185 @Apache9 ,thank you very much for point this out, yes, the original {{FSHLog.RingBufferEventHandler.onEvent}} which called {{FSHLog.append}} also have the same problem you described and may also block the single-thread, this is the problem of the {{FSOutputStream}} itself. Here I just want to make {{FSHLog}} could retry as {{AsyncFSWAL}} when possible, in the PR , if {{FSHlog.append}} throws exception, we could also reuse the logic in {{AsyncFSWAL.syncFailed}} to retry. -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org