We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We're not handling the lease correctly when we update an entity, e.g.
update
Connector/extensions/control-plane/store/sql/transfer-process-store-sql/src/main/java/org/eclipse/edc/connector/store/sql/transferprocess/store/SqlTransferProcessStore.java
Lines 146 to 147 in d2f8e13
or
Connector/extensions/control-plane/store/sql/contract-negotiation-store-sql/src/main/java/org/eclipse/edc/connector/store/sql/contractnegotiation/store/SqlContractNegotiationStore.java
Lines 110 to 111 in d2f8e13
(it's like this pretty much on every sql store implementation).
The correct behavior is shown in the delete implementation:
delete
Lines 132 to 139 in d2f8e13
we should acquire the lease BEFORE executing the update statement, and the breakLease should happen after it.
breakLease
To have this working in the correct way, the acquireLease method should change a bit:
acquireLease
Connector/extensions/common/sql/sql-lease/src/main/java/org/eclipse/edc/sql/lease/SqlLeaseContext.java
Lines 81 to 83 in d2f8e13
it should not fail when the acquireLease is ran by the lease holder, in this case likely it should "renew" the lease.
In fact this flaw could be somehow related to #3514
The text was updated successfully, but these errors were encountered:
ndr-brt
No branches or pull requests
Bug Report
Describe the Bug
We're not handling the lease correctly when we
update
an entity, e.g.Connector/extensions/control-plane/store/sql/transfer-process-store-sql/src/main/java/org/eclipse/edc/connector/store/sql/transferprocess/store/SqlTransferProcessStore.java
Lines 146 to 147 in d2f8e13
or
Connector/extensions/control-plane/store/sql/contract-negotiation-store-sql/src/main/java/org/eclipse/edc/connector/store/sql/contractnegotiation/store/SqlContractNegotiationStore.java
Lines 110 to 111 in d2f8e13
(it's like this pretty much on every sql store implementation).
Expected Behavior
The correct behavior is shown in the
delete
implementation:Connector/extensions/control-plane/store/sql/contract-negotiation-store-sql/src/main/java/org/eclipse/edc/connector/store/sql/contractnegotiation/store/SqlContractNegotiationStore.java
Lines 132 to 139 in d2f8e13
we should acquire the lease BEFORE executing the update statement, and the
breakLease
should happen after it.Possible Implementation
To have this working in the correct way, the
acquireLease
method should change a bit:Connector/extensions/common/sql/sql-lease/src/main/java/org/eclipse/edc/sql/lease/SqlLeaseContext.java
Lines 81 to 83 in d2f8e13
it should not fail when the
acquireLease
is ran by the lease holder, in this case likely it should "renew" the lease.In fact this flaw could be somehow related to #3514
The text was updated successfully, but these errors were encountered: