Uploaded image for project: 'Bookkeeper'
  1. Bookkeeper
  2. BOOKKEEPER-551

Empty Ledger Metadata Leak in Hedwig

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: hedwig-server
    • Labels:
      None

      Description

      When topic is acquired in BookkeeperPersistenceManager#recoverLastTopicLedgerAndOpenNewOne(), empty ledger is just ignored:

      if (numEntriesInLastLedger <= 0) {
          // this was an empty ledger that someone created but
          // couldn't write to, so just ignore it
          logger.info("Pruning empty ledger: " + ledgerId + " for topic: " + topic.toStringUtf8());
          closeLedger(ledgerHandle);
          openNewTopicLedger(topic, expectedVersionOfLedgerNode, topicInfo,
                             expectedStartSeqId, false, cb, ctx);
          return;
      }
      

      So these empty ledgers are leaked since its metadata is not deleted.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jiannan Jiannan Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: