Skip to content

[DEFECT] Push Publish Mode "Content and Relationships" include all in cluster #34868

@ihoffmann-dot

Description

@ihoffmann-dot

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:

  1. 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(","));
}
  1. Lookup Logic: When evaluating if an asset should be excluded by mod_date in DependencyModDateUtil, the system resolves all currently enabled endpoints for the environment into a comma-separated string (e.g., "ID1,ID2").

  2. The Mismatch: The SQL query in PushedAssetsFactoryImpl performs 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

  1. Set up a local environment with 1 Authoring node and at least 2 Delivery nodes sharing DB (see attached Dockerfile example).
  2. 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_KEY environment variable as the Auth Key. (see image)
  3. In any of the Delivery environments, go to Configuration -> Publishing Environments and configure the "Receive From" (Authoring node). Use the same PUSH_PUBLISHING_AUTH_KEY value. (see image)
  4. Create a new Content Type.
  5. Create a Contentlet of that type and publish it.
  6. Perform a Push Publish of the created contentlet, selecting the "Content and Relationships" option.
  7. Monitor the Publishing Queue until the process completes.
  8. Check the publishing_pushed_assets table in the database for the record corresponding to the published contentlet.
  9. Current Scenario:
  • In the endpoint_ids field, 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.
  1. Expected Scenario:
  • The endpoint_ids field 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 PushToAll is disabled.
  • The full set of environment endpoint IDs must be persisted in the publishing_pushed_assets table.
  • Subsequent pushes to the same environment must correctly identify the "Last Push" record, allowing mod_date filtering to work as expected.

dotCMS Version

main

Severity

High - Major functionality broken

Links

Files

docker-compose.yml

Image Image

Metadata

Metadata

Assignees

Type

Projects

Status

QA

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions