Skip to content

[18.0][IMP] queue_job: handle same uuid in duplicated db#852

Closed
hoangtrann wants to merge 1 commit intoOCA:18.0from
hoangtrann:18.0-fix-job-mismatch-db-name-after-db-duplication
Closed

[18.0][IMP] queue_job: handle same uuid in duplicated db#852
hoangtrann wants to merge 1 commit intoOCA:18.0from
hoangtrann:18.0-fix-job-mismatch-db-name-after-db-duplication

Conversation

@hoangtrann
Copy link
Copy Markdown
Contributor

Because jobrunner can be initialized with instance having multiple databases, cloning a db with failed jobs would cause the jobrunner to failed and causing jobs hang.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @guewen,
some modules you are maintaining are being modified, check this out!

@hoangtrann hoangtrann force-pushed the 18.0-fix-job-mismatch-db-name-after-db-duplication branch from 69a3b8e to 76d29bd Compare November 20, 2025 01:58
@sbidoul sbidoul added this to the 18.0 milestone Nov 22, 2025
job.db_name,
db_name,
)
self.remove_job(uuid)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not quite sure this is a correct thing to do. We still end up with two jobs with the same uuid in the queue and that's going to be confusing, if only when reading the logs. I suspect it will also break things down the line.

If that case is important to you, perhaps you could have a little script that updates uuid and dbname in the jobs of the cloned database?

Copy link
Copy Markdown
Member

@sbidoul sbidoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another problem when duplicating a database is graph_uuid, which is also supposed to be unique.

So at this point I don't think this is an easy thing to support.

@sbidoul sbidoul changed the title [IMP] queue_job: handle same uuid in duplicated db [18.0][IMP] queue_job: handle same uuid in duplicated db Nov 22, 2025
@hoangtrann
Copy link
Copy Markdown
Contributor Author

that's fair point, let me think about this more

@hoangtrann hoangtrann marked this pull request as draft December 25, 2025 17:49
@github-actions
Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Apr 26, 2026
@hoangtrann hoangtrann closed this Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants