From ede09be2084b83c5d1655de8517ec552c17dbff6 Mon Sep 17 00:00:00 2001 From: rdhabalia Date: Mon, 18 Dec 2023 22:33:41 -0800 Subject: [PATCH 1/2] [improve][pip] PIP-327: Support force topic loading for unrecoverable recovery --- pip/pip-327.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pip/pip-327.md diff --git a/pip/pip-327.md b/pip/pip-327.md new file mode 100644 index 0000000000000..6d3d891950d35 --- /dev/null +++ b/pip/pip-327.md @@ -0,0 +1,40 @@ +# PIP-327: Support force topic loading for unrecoverable errors + +# Motivation + +As discussed in Issue: https://github.com/apache/pulsar/issues/21751 + +We have introduced a configuration called `autoSkipNonRecoverableData` before open-sourcing Pulsar as we have come across with various situations when it was not possible to recover ledgers belonging to managed-ledger or managed-cursors and the broker was not able to load the topics. In such situations,`autoSkipNonRecoverableData` flag helps to skip non-recoverable leger-recovery errors such as ledger_not_found and allows the broker to load topics by skipping such ledgers in disaster recovery. + +Brokers can recognize such non-recoverable errors using bookkeeper error codes but in some cases, it’s very tricky and not possible to conclude non-recoverable errors. For example, the broker can not differentiate between all the ensemble bookies of the ledgers that are temporarily unavailable or are permanently removed from the cluster without graceful recovery, and because of that broker doesn’t consider all the bookies deleted as a non-recoverable error though we can not recover ledgers in such situations where all the bookies are removed due to various reasons such as Dev cluster clean up or system faced data disaster with multiple bookie loss. In such situations, the system admin has to manually identify such non-recoverable topics and update those topics’ managed-ledger and managed-cursor’s metadata and reload topics again which requires a lot of manual effort and sometimes it might not be feasible to handle such situations with a large number of topics that require this manual procedure to fix those topics. + +Therefore, the system admin should have a dynamic configuration called `managedLedgerForceRecovery` to use in such situations to allow brokers to forcefully load topics by skipping ledger failures to avoid topic unavailability and perform auto repairs of the topics. This will allow the admin to handle disaster recovery situations in a controlled and automated manner and maintain the topic availability by mitigating such failures. + + + +# Goals + +Support force topic loading and recovery for unrecoverable situation where broker can skip unrecoverable with uncertain bookkeeper error codes. + + +## Design & Implementation Details + +### (1) Broker Changes + +Broker will have new configuration `managedLedgerForceRecovery` and if this flag is enabled then managed ledger will ignore any kind of failure if broker see's while recovering managed-ledger or managed-cursor. + +# Security Considerations + + + +# General Notes + +# Links + +Issue: https://github.com/apache/pulsar/issues/21751 From 7b53f6521fea76151f2e9dfeac833801e5cd84ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=81=93=E5=90=9B?= Date: Tue, 14 May 2024 14:38:02 +0800 Subject: [PATCH 2/2] Update discuss/vote links --- pip/pip-327.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pip/pip-327.md b/pip/pip-327.md index 6d3d891950d35..00b3de424f1dc 100644 --- a/pip/pip-327.md +++ b/pip/pip-327.md @@ -38,3 +38,5 @@ If there is uncertainty for this section, please submit the PIP and request for # Links Issue: https://github.com/apache/pulsar/issues/21751 +Discuss thread: https://lists.apache.org/thread/w7w91xztdyy07otw0dh71nl2rn3yy45p +Vote thread: https://lists.apache.org/thread/hh9t6nz0pqjo7tbfn12nbwtylrvq4f43