Non‑sequential increment IDs for orders in Adobe Commerce Cloud

In Adobe Commerce Cloud Pro, order, invoice, shipment, and other entity increment IDs increase in steps such as 100000001 → 100000004 → 100000007 instead of incrementing by 1. This behavior occurs due to the Galera multi-node database architecture used in Cloud Pro environments. To fix this, treat increment IDs as unique identifiers only and avoid relying on sequential numbering.

Description description

Environment

Adobe Commerce on Cloud Pro with multi-node MySQL (Galera Cluster)

Issue/Symptoms

Merchants observe that increment IDs:

  • Increase in steps (commonly +3)
  • Do not follow a strict sequence
  • Skip values

These behaviors raise concerns about:

  • Customer-facing order numbers
  • Internal reporting
  • Audit and compliance requirements

Cause

Cloud Pro environments use a 3-node Galera cluster to support high availability and data consistency.
To prevent primary key collisions during concurrent writes, MySQL uses the following configuration:

  • auto_increment_increment = 3
  • auto_increment_offset = {1,2,3}(per node)

Each node generates IDs independently in its own sequence. For example:

  • Node 1 → 1, 4, 7, 10…
  • Node 2 → 2, 5, 8, 11…
  • Node 3 → 3, 6, 9, 12…

As a result, increment IDs are:

  • Globally unique
  • Nonsequential when viewed as a single stream

Expected behavior

  • Increment IDs are not guaranteed to follow a sequence.
  • Gaps and step increases are normal.
  • This behavior applies to all entities that use auto-increment.

This behavior also occurs outside clustered environments due to:

  • Failed transactions
  • Rollbacks
  • Concurrent operations

Impact

  • System functionality and data integrity remain unaffected.
  • IDs remain unique and valid for all Adobe Commerce Cloud operations.
  • Only sequential numbering expectations are affected.

Resolution resolution

To resolve this issue, follow these steps:

  1. Avoid relying on sequential increment IDs.

    • Treat increment IDs as unique identifiers, not ordered values.

    • For ordering and reporting, use:

      • created_at timestamps
      • Entity relationships or business logic
  2. Update reporting and audit tools.

    • If your tools expect strict sequencing:

      • Update logic to handle noncontiguous IDs.
      • Remove dependencies on numeric continuity.
  3. Implement custom sequencing (if required).

    • If your business requires strictly sequential numbers:

      • Create a custom sequence generator (for example, a custom module).
      • Store the value as a separate attribute (do not replace the increment ID).
      • Use proper locking to prevent race conditions.

Best Practice

Treat increment IDs like license plates, not ticket counters:

  • They uniquely identify items
  • They do not guarantee order

Conclusion

Non-sequential increment IDs in Cloud Pro are a direct result of the platform’s distributed database design. This ensures scalability and reliability, but means strict sequencing is not supported at the infrastructure level. For use cases requiring sequential numbering, a custom or external solution is required.

recommendation-more-help
experience-cloud-kcs-help-kbarticles