dotCMS / dotCMS/core

Push Publish: same bundle can be re-triggered while already publishing (non-idempotent under concurrent uploads)

Open
#35,041 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OKR : Customer Support stale
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Problem Statement

Push Publish receiver flow has a non-idempotent behavior for the same bundle under concurrent/repeated uploads.

BundlePublisherResource (and other upload paths) tries to avoid re-triggering when status is PUBLISHING_BUNDLE, but the guard is ineffective:

caller checks if (!status.equals(PUBLISHING_BUNDLE))
updateAuditTable(...) always builds and returns a new status set to RECEIVED_BUNDLE
So the condition is effectively always true and the same bundle can be queued again even while it is already in progress.
Operational impact under load:

duplicated processing of same bundle
status regressions/overwrites in audit history
unpredictable publish lifecycle and harder troubleshooting
Backend issue only (no browser/OS dependency).

Steps to Reproduce

Use a receiver endpoint and upload the same bundle.tar.gz twice in very short interval (or concurrent requests).
Ensure first processing has already started (PUBLISHING_BUNDLE) when second upload arrives.
Observe upload path logic:
updateAuditTable(...) returns RECEIVED_BUNDLE
guard if (!status.equals(PUBLISHING_BUNDLE)) passes
another PushPublisherJob trigger is scheduled for same bundle
Check audit/status history for non-deterministic state progression and repeated processing attempts.

Acceptance Criteria

Re-upload of the same bundle while it is already PUBLISHING_BUNDLE does not schedule a second processing job.
The in-progress guard is based on authoritative current persisted status (not a freshly constructed status object).
Uploading same bundle concurrently is idempotent: one effective processing execution per bundle-at-a-time.
Audit status does not regress from in-progress/final states back to RECEIVED_BUNDLE due duplicate upload path.
Integration test covers concurrent duplicate uploads of same bundle and validates deterministic lifecycle.

dotCMS Version

26.03+

Severity

High - Major functionality broken

Links

NA

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with BundlePublisherResource and the other upload paths that call updateAuditTable(...), then trace how the receiver endpoint schedules PushPublisherJob. Reproduce duplicate uploads while the status is PUBLISHING_BUNDLE and inspect the audit/status history. Done means one effective processing execution per bundle at a time, no status regression, and an integration test covering concurrent duplicate uploads.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.