Skip to content
This repository was archived by the owner on Dec 19, 2017. It is now read-only.

question about pessimistic case #320

@publicocean0

Description

@publicocean0

Hi , i trying to understand how to use your library. The documentation is clear but there is a thing i dont understand.It explains when all goes well in the transaction.But in the opposite case? Supposing there is Storage Key/Value S is a LSM-like storage,Nodes F,A,B,C,D.
When you receive the Command "put" K,X ( to save a object X)
you see there is a conflict with another version of the object X.
For example the optimistic lock is not correct. In this case how to do? Commit class don t contains rollback.
Maybe throwing a exception (received also by sender)?
How to notify the cluster nodes it it is not possible to commit ? How to handle the error in the sender?

In my mind i thought a pseudo-code like it:

node F .put (K,x) {
TransactionalLog.putEntry("put",K,X);
copycat.send command->{
when command is accepted by quorum-> storage.save(X); TransactionalLog.removeEntry("put",X);
when command is reject by quorum ->TransactionalLog.removeEntry("put",X); throw rollbackException()
}
}

received from nodes A,B,C,D-> (A KO,b KO,C KO,D ok) --> the quorum is KO but i have to rollback
Probably TransactionalLog is already present in copycat so it is not necessary.
How to intercept Accepted/rejected?
example:
received from nodes A,B,C,D-> (A ok,b ok,C KO,D ok) --> the quorum is OK but i have to replair node C
in this case i have to not close the StateMachine commit in node C until i repaired the inconsistent status.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions