Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Unable to smoothly upgrade from 0.2.2 to 0.2.6 #162

Closed
cserwen opened this issue Jun 30, 2022 · 1 comment · Fixed by #163
Closed

[Bug] Unable to smoothly upgrade from 0.2.2 to 0.2.6 #162

cserwen opened this issue Jun 30, 2022 · 1 comment · Fixed by #163

Comments

@cserwen
Copy link
Contributor

cserwen commented Jun 30, 2022

  1. Question:
  • Open batch push, upgrade from 0.2.2 to 0.2.6 version
  • Operate the slave node, master node, slave node in sequence, and the last slave node will not be able to synchronize
  1. Reason
private void doCheckBatchAppendResponse() throws Exception {
    long peerWaterMark = getPeerWaterMark(term, peerId);
    Pair pair = batchPendingMap.get(peerWaterMark + 1);
    if (pair != null && System.currentTimeMillis() - (long) pair.getKey() > dLedgerConfig.getMaxPushTimeOutMs()) {
        long firstIndex = peerWaterMark + 1;
        long lastIndex = firstIndex + (int) pair.getValue() - 1;
        logger.warn("[Push-{}]Retry to push entry from {} to {}", peerId, firstIndex, lastIndex);
        batchAppendEntryRequest.clear();
        for (long i = firstIndex; i <= lastIndex; i++) {
            DLedgerEntry entry = dLedgerStore.get(i);
            batchAppendEntryRequest.addEntry(entry);
        }
        sendBatchAppendEntryRequest();
    }
}
@RongtongJin
Copy link
Contributor

Good catch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants