hgromer commented on code in PR #8611:
URL: https://github.com/apache/hbase/pull/8611#discussion_r3969453427
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java:
##########
@@ -1080,11 +1083,9 @@ public void onEvent(final RingBufferTruck truck, final
long sequence, boolean en
entry.release();
}
} else {
- // What is this if not an append or sync. Fail all up to this!!!
- cleanupOutstandingSyncsOnException(sequence,
- new IllegalStateException("Neither append nor sync"));
- // Return to keep processing.
- return;
+ // Empty truck: publishSyncOnRingBuffer claimed the sequence but
threw before loading it.
+ // Fall through rather than failing syncs, so the empty slot is
harmless.
+ LOG.warn("RingBufferTruck with unexpected type: {}", truck.type());
Review Comment:
Would it be better to have an explicit case for this? Maybe something like
```java
} else if (truck.type() == RingBufferTruck.Type.EMPTY) {
LOG.warn("Empty RingBufferTruck at sequence {}", sequence);
return;
} else {
cleanupOutstandingSyncsOnException(sequence,
new IllegalStateException("Unexpected truck type: " + truck.type()));
return;
}
```
That way we still cleanup on truly exceptional cases?
--
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]