Skip to content

Commit

Permalink
Merge branch '2.1' into 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dlmarion committed Jan 7, 2025
2 parents 0553feb + fe22a33 commit a47e4b8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ private void flush(UpdateSession us) {
}
} catch (Exception e) {
TraceUtil.setException(span2, e, true);
log.error("Error logging mutations sent from {}", TServerUtils.clientAddress.get(), e);
throw e;
} finally {
span2.end();
Expand Down Expand Up @@ -450,6 +451,10 @@ private void flush(UpdateSession us) {
us.commitTimes.addStat(t2 - t1);

updateAvgCommitTime(t2 - t1, sendables.size());
} catch (Exception e) {
TraceUtil.setException(span3, e, true);
log.error("Error committing mutations sent from {}", TServerUtils.clientAddress.get(), e);
throw e;
} finally {
span3.end();
}
Expand Down Expand Up @@ -696,6 +701,7 @@ private void writeConditionalMutations(Map<KeyExtent,List<ServerConditionalMutat
updateAvgCommitTime(t2 - t1, sendables.size());
} catch (Exception e) {
TraceUtil.setException(span3, e, true);
log.error("Error committing mutations sent from {}", TServerUtils.clientAddress.get(), e);
throw e;
} finally {
span3.end();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -859,22 +859,21 @@ public void commit(CommitSession commitSession, List<Mutation> mutations) {
totalBytes += mutation.numBytes();
}

getTabletMemory().mutate(commitSession, mutations, totalCount);

synchronized (this) {
if (isCloseComplete()) {
throw new IllegalStateException(
"Tablet " + extent + " closed with outstanding messages to the logger");
try {
getTabletMemory().mutate(commitSession, mutations, totalCount);
synchronized (this) {
getTabletMemory().updateMemoryUsageStats();
if (isCloseComplete()) {
throw new IllegalStateException(
"Tablet " + extent + " closed with outstanding messages to the logger");
}
numEntries += totalCount;
numEntriesInMemory += totalCount;
ingestCount += totalCount;
ingestBytes += totalBytes;
}
// decrement here in case an exception is thrown below
} finally {
decrementWritesInProgress(commitSession);

getTabletMemory().updateMemoryUsageStats();

numEntries += totalCount;
numEntriesInMemory += totalCount;
ingestCount += totalCount;
ingestBytes += totalBytes;
}
}

Expand Down

0 comments on commit a47e4b8

Please sign in to comment.