Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
eolivelli committed Nov 13, 2024
1 parent 376b9dd commit 69bd41c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void readLastConfirmedDataComplete(int rc, RecoveryData data) {
lh.lastAddPushed = lh.lastAddConfirmed = Math.max(data.getLastAddConfirmed(),
(lastEnsembleEntryId - 1));

lh.length = data.getLength();
lh.length.set(data.getLength());
lh.pendingAddsSequenceHead = lh.lastAddConfirmed;
startEntryToRead = endEntryToRead = lh.lastAddConfirmed;
}
Expand Down Expand Up @@ -192,7 +192,7 @@ public void onEntryComplete(int rc, LedgerHandle lh, LedgerEntry entry, Object c
* be added again when processing the call to add it.
*/
synchronized (lh) {
lh.length = entry.getLength() - (long) data.length;
lh.length.set(entry.getLength() - (long) data.length);
// check whether entry id is expected, so we won't overwritten any entries by mistake
if (entry.getEntryId() != lh.lastAddPushed + 1) {
LOG.error("Unexpected to recovery add entry {} as entry {} for ledger {}.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ CompletableFuture<Versioned<LedgerMetadata>> closeRecovered() {
long lac, len;
synchronized (this) {
lac = lastAddConfirmed;
len = length;
len = length.get();
}
LOG.info("Closing recovered ledger {} at entry {}", getId(), lac);
CompletableFuture<Versioned<LedgerMetadata>> f = new MetadataUpdateLoop(
Expand Down

0 comments on commit 69bd41c

Please sign in to comment.