Skip to content

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

@cserwen

Description

@cserwen
  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();
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions