Uh oh!
There was an error while loading. Please reload this page.
HBASE-25596: Fix NPE and avoid permanent unreplicated data due to EOF - #2975
Conversation
| // After we removed the WAL from the queue, we should | ||
| // try shipping the existing batch of entries, we do not want to reset | ||
| // stream since entry stream doesn't have the correct data at this point | ||
| isBatchQueuedToBeShipped(entryStream, batch, hasMoreData, true); |
There was a problem hiding this comment.
This is the fix to avoid permanent data loss.
Uh oh!
There was an error while loading. Please reload this page.
| // If this is a recovered queue, the queue is already full and the first log | ||
| // normally has a position (unless the RS failed between 2 logs) | ||
| private long getRecoveredQueueStartPos(long startPosition) { | ||
| public long getRecoveredQueueStartPos(long startPosition) { |
There was a problem hiding this comment.
Is this change needed? I don't see any changes to a caller of this method in this patch
There was a problem hiding this comment.
No, I will revert it.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| assertEquals(0, queue.size()); | ||
| } | ||
| @Test |
Uh oh!
There was an error while loading. Please reload this page.
| queue, 0, fs, conf, getDummyFilter(), | ||
| new MetricsSource("1"), (ReplicationSource) source); | ||
| reader.run(); | ||
There was a problem hiding this comment.
do you need to do some wait here? How did you drain the queue? I might be missing something here. thanks
There was a problem hiding this comment.
@xcangCRM i think you are confusing it with .start() method which is async call. We are executing .run() which is sync call.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| * @throws InterruptedException throws interrupted exception | ||
| * @throws IOException throws io exception from stream | ||
| */ | ||
| private boolean updateBatchAndAddInShippingQueue(WALEntryStream entryStream, WALEntryBatch batch, |
There was a problem hiding this comment.
nit:
name is bit long,
how about updateBatchAndShippingQueue
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Apache-HBase
commented
Feb 23, 2021
💔 -1 overall
This message was automatically generated. |
Apache-HBase
commented
Feb 23, 2021
🎊 +1 overall
This message was automatically generated. |
apurtell
commented
Feb 23, 2021
Unless there is a change in review status I will merge this in a couple of hours. |
Please find the details in jira:
https://issues.apache.org/jira/browse/HBASE-25596