Skip to content

Lock operation stalls for too long #1781

@LeandreBl

Description

@LeandreBl

Following #1766 changes, it appears that the current lock/unlock behaviour is not compliant with https://www.rfc-editor.org/rfc/rfc6241#section-7.5 anymore in my opinion.

" An attempt to lock the configuration datastore MUST fail if an
      existing session or other entity holds a lock on any portion of
      the lock target."

In what I understand from that sentence, it should be an operation that almost instantly return an error if the lock cannot be acquired and shouldn't stall for long.

Changing it to np2srv.sr_timeout is in my opinion not a good choice, as this value is often very big, to be able to handle long operations for massive configurations, which is not compatible with the upper sentence because it also applies to the lock operation now.

However it is true that this lock operation will fail after the timeout is expired.

I think we should use a little timeout value, as it's not a bad practice (instead of 0) but I don't think using np2srv.sr_timeout was the right choice.

What do you think ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:bugBug description.status:completedFrom the developer perspective, the issue was solved (bug fixed, question answered,...)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions