Skip to content

Candidate datastore lock prevents sequential commit operations via RESTCONF #236

@chrissandi

Description

@chrissandi

Hi,

I would like to raise an issue related to RESTCONF behavior during batch service provisioning.

We created a bash script to test batch provisioning of services via the RESTCONF API. The script runs in two phases:

Phase 1 – Create Services

  • Executes 20 sequential POST requests to /restconf/data/clixon-controller:services
  • Each request creates a VPLS service instance with a unique vpls-id (vk-vlan201 through vk-vlan220)
  • All other service parameters are identical (same devices, interfaces, loopback IPs, etc.)
  • No delay between requests

Phase 2 – Commit Services

  • After all 20 services are created in the candidate datastore, the script executes 20 sequential POST requests to /restconf/operations/clixon-controller:controller-commit
  • Each commit targets a specific service instance using the service-instance parameter
  • No delay between commit requests

Observed Issue

When executing multiple sequential controller-commit operations via RESTCONF, subsequent commit requests fail with HTTP 412 errors, indicating that the candidate datastore is still locked by the previous transaction. This occurs even though each commit targets a different service instance.

Error response example:

{
  "ietf-restconf:errors": {
    "error": {
      "error-type": "application",
      "error-tag": "operation-failed",
      "error-severity": "error",
      "error-message": "Candidate db is locked by transaction \"Controller commit actions:FORCE push:COMMIT\" initiated by user:anonymous with client-id:1 using transport:cl:restconf"
    }
  }
}

From the client perspective, the requests are sent sequentially and only after the previous request has completed. However, it appears that the datastore lock is not released in time for the next commit, leading to lock contention.

I would appreciate any guidance on whether this behavior is expected.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed: plz verifyBug/feature is fixed by developer, need verification

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions