Skip to content

Fix possible end svcactions lost and missed transaction rollback on errors#141

Merged
cgalibern merged 5 commits into
opensvc:mainfrom
cgalibern:dev
Jun 8, 2026
Merged

Fix possible end svcactions lost and missed transaction rollback on errors#141
cgalibern merged 5 commits into
opensvc:mainfrom
cgalibern:dev

Conversation

@cgalibern

Copy link
Copy Markdown
Contributor

Changes Introduced

  • Transaction Logic:

    • Added missing rollback call for non-retryable errors in ExecTx.
    • Placed TODOs in base_job.go to evaluate rollback/commit requirements.
  • Operation Handling:

    • Marked all existing jobFeedInstanceResourceInfo operations as blocking, except for updateWSP (non-blocking retained for intended behavior).
  • Logging Updates:

    • Corrected the misplaced log message for updateWSP success within the loop.
  • Action ID Fix:

    • Updated action logic in job_feed_instance_action.go to accurately retrieve action IDs when multiple pids exist within one sid.
    • Renamed FindInstanceActionIDFromSID to FindInstanceActionIDFromPidAndSID for parameter clarity and accuracy.

cgalibern added 5 commits June 9, 2026 00:53
…ithin the same sid.

- Adjusted related logic in `job_feed_instance_action.go` to include `pid` in action ID retrieval.
  => retrieve correct action id when actions are run with the same sid
- Updated `FindInstanceActionIDFromSID` to `FindInstanceActionIDFromPidAndSID`, adding the `pid` parameter for more precise queries.
- Moved the `updateWSP` success log outside of the loop for proper execution context.
…g in `Operations` list

- Added `blocking: true` for operations (`dropPending`, `getData`, `dbNow`, `updateDB`, `purgeDB`) to ensure accurate execution behavior.
- Retained `blocking: false` for `updateWSP` to maintain its non-blocking behavior.
- Added rollback handling logic in `ExecTx` for failed transactions.
… logic

- Added TODO comments in `base_job.go` to review whether rollback and commit calls are still required.
@cgalibern cgalibern merged commit c67744f into opensvc:main Jun 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant