Skip to content

Commit

Permalink
BUGFIX: Fix setting srcRecordInfo during interleaving of checkpointin…
Browse files Browse the repository at this point in the history
…g and RMW (microsoft#956)

* Fix setting srcRecordInfo during checkpointing

* Also for internal upsert

---------

Co-authored-by: Hamdaan Khalid <[email protected]>
  • Loading branch information
hamdaankhalid and hamdaankhalidmsft authored Jan 25, 2025
1 parent 9a48a1c commit 0cd87b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ internal OperationStatus InternalRMW<TInput, TOutput, TContext, TSessionFunction
case LatchDestination.Retry:
goto LatchRelease;
case LatchDestination.CreateNewRecord:
if (stackCtx.recSrc.LogicalAddress >= hlogBase.HeadAddress)
srcRecordInfo = ref stackCtx.recSrc.GetInfo();

goto CreateNewRecord;
default:
Debug.Assert(latchDestination == LatchDestination.NormalProcessing, "Unknown latchDestination value; expected NormalProcessing");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ internal OperationStatus InternalUpsert<TInput, TOutput, TContext, TSessionFunct
case LatchDestination.Retry:
goto LatchRelease;
case LatchDestination.CreateNewRecord:
if (stackCtx.recSrc.LogicalAddress >= hlogBase.HeadAddress)
srcRecordInfo = ref stackCtx.recSrc.GetInfo();

goto CreateNewRecord;
default:
Debug.Assert(latchDestination == LatchDestination.NormalProcessing, "Unknown latchDestination value; expected NormalProcessing");
Expand Down

0 comments on commit 0cd87b0

Please sign in to comment.