sysrepo: SR_ERR_LOCKED when trying to apply changes
In our system we sporadically see the error SR_ERR_LOCKED when calling sr_apply_changes on the running datastore. I thought that the provided timeout would be respected when the lock is already taken by someone else, however, from looking to the code the timeout is only considered for the duration of the triggered callbacks, whereas a timeout of 0 is used for acquiring the lock here.
Is my understanding correct?
Am I supposed to always explicitly obtain the lock using sr_lock with a non-zero timeout if I want to avoid an error?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (8 by maintainers)
You should use them only if you need the datastore not to change between several calls of
sr_apply_changes().