-
Notifications
You must be signed in to change notification settings - Fork 479
Description
Problem Statement
In clustered dotCMS environments where "Push to One Endpoint" (endpoint rotation) is enabled, the Remote Publishing history resolution fails, leading to redundant asset transfers in subsequent pushes.
Technical Root Cause: The issue stems from a synchronization mismatch between how push history is recorded and how it is later queried:
- Recording History: In
PushedAssetUtil, when a bundle is prepared for an environment with rotation enabled, the code explicitly truncates the list of endpoint IDs to store only the first one:
if (!environment.getPushToAll() && endpointIds != null && endpointIds.contains(",")) {
endpointIds = endpointIds.substring(0, endpointIds.indexOf(","));
}
-
Lookup Logic: When evaluating if an asset should be excluded by
mod_dateinDependencyModDateUtil, the system resolves all currently enabled endpoints for the environment into a comma-separated string (e.g.,"ID1,ID2"). -
The Mismatch: The SQL query in
PushedAssetsFactoryImplperforms a direct string equality check:
SELECT * FROM publishing_pushed_assets WHERE asset_id = ? AND environment_id = ? AND endpoint_ids = ?
Because the stored value is a single ID (e.g., "ID1") and the lookup value is the full set (e.g., "ID1,ID2"), the query returns no results. This causes dotCMS to assume the asset has never been pushed to that environment, forcing its inclusion in the manifest even if it hasn't been modified.
Steps to Reproduce
- Set up a local environment with 1 Authoring node and at least 2 Delivery nodes sharing DB (see attached Dockerfile example).
- In the Authoring environment, go to Configuration -> Publishing Environments and configure the "Sent To" (Delivery nodes) using the Push Mode "Push to One Endpoint". Use the value from the
PUSH_PUBLISHING_AUTH_KEYenvironment variable as the Auth Key. (see image) - In any of the Delivery environments, go to Configuration -> Publishing Environments and configure the "Receive From" (Authoring node). Use the same
PUSH_PUBLISHING_AUTH_KEYvalue. (see image) - Create a new Content Type.
- Create a Contentlet of that type and publish it.
- Perform a Push Publish of the created contentlet, selecting the "Content and Relationships" option.
- Monitor the Publishing Queue until the process completes.
- Check the
publishing_pushed_assetstable in the database for the record corresponding to the published contentlet. - Current Scenario:
- In the
endpoint_idsfield, only the ID of one of the two Delivery nodes is persisted (usually the first one defined). - If another Push Publish is performed, the new Manifest will INCLUDE all items again because the history lookup fails to match the endpoint set.
- Expected Scenario:
- The
endpoint_idsfield should persist all endpoint IDs for that environment, concatenated with commas (e.g.,ID1,ID2). - If another Push Publish is performed, the Manifest should EXCLUDE all related items that haven't changed, except for the specifically published contentlet.
Acceptance Criteria
To resolve this issue, the following objective criteria must be met:
- Existing behaviour for Push Publishing with Push to All Endpoints configuration should remain working the same.
- The endpoint IDs should no longer be truncated when
PushToAllis disabled. - The full set of environment endpoint IDs must be persisted in the
publishing_pushed_assetstable. - Subsequent pushes to the same environment must correctly identify the "Last Push" record, allowing
mod_datefiltering to work as expected.
dotCMS Version
main
Severity
High - Major functionality broken
Links
Files

Metadata
Metadata
Assignees
Labels
Type
Projects
Status