HBASE-30346: Fix NPE in AbstractFSWAL WAL-roll debug logging aborting… - #8580
HBASE-30346: Fix NPE in AbstractFSWAL WAL-roll debug logging aborting…#8580mnpoonia wants to merge 1 commit into
Conversation
… RegionServer FSHLog#getPipeline() delegated directly to Hadoop's DFSOutputStream#getPipeline(), which can legitimately return null (streamer closed, or no block pipeline currently established between blocks). The debug logging added in HBASE-28775 replaced the null-tolerant Arrays.toString(...) with Arrays.stream(...), which throws NPE on null, turning a benign transient HDFS state into a RegionServer self-abort during WAL rolling -- even though the roll itself had already succeeded. Normalize FSHLog#getPipeline() to never return null (an empty array instead), matching the contract AsyncFSWAL#getPipeline() already honors.
7c2d364 to
1ecc0f5
Compare
|
Need help in triggering the workflow. |
|
This only happens for FSHLog? |
Yes — this is FSHLog-only.
DatanodeInfo[] getPipeline() {
return output != null ? output.getPipeline() : new DatanodeInfo[0];
}where
Neither can return |
|
@Apache9 @virajjasani Can you help get this PR though. If needed i am happy to open PR for branch-3 and branch-2. I did check and the code was same but can open seperate PR if needed. |
… RegionServer
FSHLog#getPipeline() delegated directly to Hadoop's DFSOutputStream#getPipeline(), which can legitimately return null (streamer closed, or no block pipeline currently established between blocks). The debug logging added in HBASE-28775 replaced the null-tolerant Arrays.toString(...) with Arrays.stream(...), which throws NPE on null, turning a benign transient HDFS state into a RegionServer self-abort during WAL rolling -- even though the roll itself had already succeeded.
Normalize FSHLog#getPipeline() to never return null (an empty array instead), matching the contract AsyncFSWAL#getPipeline() already honors.