Skip to content

[worker] Fix hbmon_log_last end extension, simplify resmon upsert - #155

Merged
cgalibern merged 2 commits into
opensvc:mainfrom
cgalibern:dev
Sep 26, 2026
Merged

cgalibern merged 2 commits into
opensvc:mainfrom
cgalibern:dev

Conversation

@cgalibern

Copy link
Copy Markdown
Contributor

Changes

[worker] Fix hbmon_log_last end extension query

HBLogLastExtend built an invalid query: the IN list was missing its
opening parenthesis. Its args slice was also created with length
3*len(l) and then appended to, so 3*len(l) nil values came before
the real values.

Without the fix, the hbmon_log_last.end timestamp was never extended.

[worker] Don't reassign resmon unique key columns on duplicate

ResmonUpdate's ON DUPLICATE KEY UPDATE reassigned svc_id,
node_id, vmname and rid. The duplicate can only come from
uk_resmon_1, which is made of these columns, so they already match.
The redundant assignments are dropped. No behaviour change.

HBLogLastExtend built an invalid query: the IN list was missing its
opening parenthesis. Its args slice was also created with length
3*len(l) and then appended to, so 3*len(l) nil values came before the
real values.

Without the fix, the hbmon_log_last end timestamp was never extended.
ResmonUpdate's ON DUPLICATE KEY UPDATE reassigned svc_id, node_id,
vmname and rid. The duplicate can only come from uk_resmon_1, which is
made of these columns, so they already match. Drop the redundant
assignments.
@cgalibern
cgalibern merged commit d28eee5 into opensvc:main Sep 26, 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