<- Back to NucleoCore
Skip to main content

Cluster Locks

Cluster wide DataEntry locks.

You can lock a DataEntry by specifying in the copy step that you want to lock the entry. This will send a request to lock the entry to all of the running instances of NucleoDB.

flowchart TD
    K[Kafka Cluster]
    NB1[NDB Application1]
    NB2[NDB User1]
    NB3[NDB User2]
    C[Controller] -->|1: LOCK WAIT| NB1
    NB1 -->|2: REQUEST LOCK| K
    K --> |3: LOCK REQUEST RECEIVED| NB1
    K --> |3: LOCK REQUEST RECEIVED| NB2
    K --> |3: LOCK REQUEST RECEIVED| NB3
    NB1 --> |4: SET ACTIVE LOCK| NB1
    NB2 --> |4: SET ACTIVE LOCK| NB2
    NB3 --> |4: SET ACTIVE LOCK| NB3
    NB1 --> |5: LOCK SUCCESS, NOTIFY WAIT| C
    C --> |6: SAVE ENTRY| NB1
    NB1 -->|7: RELEASE LOCK| K
    K -->|8: REMOVE LOCK| NB1
    K -->|8: REMOVE LOCK| NB2
    K -->|8: REMOVE LOCK| NB3
    NB1 -->|9: DELETE LOCK FOR ENTRY| NB1
    NB2 -->|9: DELETE LOCK FOR ENTRY| NB2
    NB3 -->|9: DELETE LOCK FOR ENTRY| NB3

image.png