Skip to content

Commit

Permalink
minimize snapshot generation when recover is not enabled
Browse files Browse the repository at this point in the history
also, fix head ++head / head++ issue
  • Loading branch information
ar committed Jan 15, 2025
1 parent 2072a20 commit 0c798d5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ private void runTransaction (Serializable context, int session) {
evt = null;
thread.setName (getName() + "-" + session + ":idle");
int action = -1;
id = head.incrementAndGet ();
id = head.getAndIncrement ();
TMEvent tme = new TMEvent(getName(), id);
Txn txn = new Txn(getName(), id);

Expand Down Expand Up @@ -835,6 +835,9 @@ protected void snapshot (long id, Serializable context) {
snapshot (id, context, null);
}
protected void snapshot (long id, Serializable context, Integer status) {
if (!doRecover && status != DONE)
return; // nothing to do

var jfr = new TMEvent.Snapshot(getName()+":"+status, id);
jfr.begin();

Expand Down

0 comments on commit 0c798d5

Please sign in to comment.