Skip to content

(bug) fixes various bugs and performance issues#1823

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:fixes
Jun 7, 2026
Merged

(bug) fixes various bugs and performance issues#1823
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:fixes

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

Bugs

  • Corrected a logging mistake where the cluster name was accidentally populated with the cluster namespace in two places, making log lines useless when debugging by cluster name.
  • Fixed wrong control flow in the pull-mode agent status handler: one error type was being checked in the wrong branch (it was only reachable when there was no error, so it never fired), and the function could panic with a nil dereference when the agent returned an error without a status payload.
  • Fixed a data race in the Helm chart manager: one method was reading from a shared map without holding the mutex, while concurrent reconcilers could be writing to it.

Performance

  • The dependency manager's background update loop was holding a write lock — which blocks all concurrent reconcilers — across a batch of API calls. It now snapshots what needs updating, releases the lock, makes the API calls, then re-acquires the lock only to clear the completed entries.
  • The dependency manager's startup rebuild loop was spinning at full speed retrying on any API error with no delay, which could hammer the API server during an outage. It now waits 5 seconds between retries and respects context cancellation.

**Bugs**

- Corrected a logging mistake where the cluster name was accidentally
populated with the cluster namespace in two places, making log lines
useless when debugging by cluster name.
- Fixed wrong control flow in the pull-mode agent status handler: one
error type was being checked in the wrong branch (it was only reachable
when there was no error, so it never fired), and the function could panic
with a nil dereference when the agent returned an error without a status payload.
- Fixed a data race in the Helm chart manager: one method was reading from a shared
map without holding the mutex, while concurrent reconcilers could be writing to it.

**Performance**

- The dependency manager's background update loop was holding a write lock — which
blocks all concurrent reconcilers — across a batch of API calls. It now snapshots
what needs updating, releases the lock, makes the API calls, then re-acquires the
lock only to clear the completed entries.
- The dependency manager's startup rebuild loop was spinning at full speed retrying
on any API error with no delay, which could hammer the API server during an outage.
It now waits 5 seconds between retries and respects context cancellation.
@gianlucam76 gianlucam76 merged commit fa51061 into projectsveltos:main Jun 7, 2026
9 checks passed
@gianlucam76 gianlucam76 deleted the fixes branch June 7, 2026 13:45
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