File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,19 @@ func (f *FCFSScheduler) Run(ctx context.Context) error {
9393 /* we assume the transaction has been processed -> updated Redis */
9494 transaction .Status = types .StatusSuccess
9595
96+ /* this whole code snippet should be called "Update Session State after transaction execution" */
97+
98+ /* update the session's completed/failed count */
99+ curSession .Mutex .Lock ()
100+ if transaction .ExecStatus {
101+ curSession .CompletedCount ++
102+ f .curSessionManager .IncrementSessionCompletedRedis (curSession )
103+ } else {
104+ curSession .FailedCount ++
105+ f .curSessionManager .IncrementSessionFailedRedis (curSession )
106+ }
107+ curSession .Mutex .Unlock ()
108+
96109 /* store the result of processed transaction into Redis */
97110 f .curSessionManager .SaveTransactionRedisList (curSession , transaction , "txresults" )
98111
You can’t perform that action at this time.
0 commit comments