Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.4.0
    • Component/s: None
    • Labels:
      None

      Description

      LastAddConfirmed in LedgerHandle is updated when an entry is persisted successfully.

      When sending a new entry, the most recent lastAddConfirmed is sent along. The reason is to start with a reasonable (confirmed) entryId when doing ledger recovery, by reading all entries from lastAddConfirmed until a NoEntryException is reached.

      If lastAddConfirmed updates are not visible to the thread that is writing new entries, new entries will carrie an older lastAddConfirmed value, and recovering the ledger will requiring reading one-by-one many entries.
      When writing several thousand of entries per sec, the lastAddConfirmed can lag behind a lot from the real last entry.

      We should use volatile, to ensure writing thread sees the updated version.

        Attachments

          Activity

            People

            • Assignee:
              mmerli Matteo Merli
              Reporter:
              mmerli Matteo Merli
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: