Skip to content

CP-53843: reusable SM session#7002

Open
GabrielBuica wants to merge 4 commits intoxapi-project:masterfrom
GabrielBuica:private/dbuica/CP-53843
Open

CP-53843: reusable SM session#7002
GabrielBuica wants to merge 4 commits intoxapi-project:masterfrom
GabrielBuica:private/dbuica/CP-53843

Conversation

@GabrielBuica
Copy link
Copy Markdown
Contributor

Builds on top of #6991

This is meant to reuse the same xapi session for sm_exec calls.

Gabriel Buica added 4 commits April 10, 2026 10:05
`exec_with_new_*` function create orphaned traces for subtasks with
parents not in the database.

This is meant to address this and link these spans to their correct
parent.

Signed-off-by: Gabriel Buica <danutgabriel.buica@citrix.com>
refactor the code before implementing reusable sessions for `sm_exec`

Signed-off-by: Gabriel Buica <danutgabriel.buica@citrix.com>
The session reuse logic in `xapi_session.ml` does work in this usecase,
sm calls are made with `pool=false`. So reimplement the logic so that we
use a single session for `sm_exec`.

This should help with session count inside xapi.

Signed-off-by: Gabriel Buica <danutgabriel.buica@citrix.com>
Signed-off-by: Gabriel Buica <danutgabriel.buica@citrix.com>
@psafont
Copy link
Copy Markdown
Member

psafont commented Apr 10, 2026

This seems like it would fix some issues I've seen in XCP-ng customers, but it's difficult to tell with the very short description, could you explain a bit further of what's the effect?

In particular, the problem is that some sessions used for long-running migrations are being evicted from the cache because of the amount of new sessions being created by SM.

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.

2 participants