-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
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
core: apply 2-state transition pattern to TransferProcessManager #831
core: apply 2-state transition pattern to TransferProcessManager #831
Conversation
...n/java/org/eclipse/dataspaceconnector/transfer/core/transfer/TransferProcessManagerImpl.java
Show resolved
Hide resolved
@algattik the minikube test is failing, but it works locally, do you know what the cause could be? |
I think understood the problem, the |
Codecov Report
@@ Coverage Diff @@
## main #831 +/- ##
============================================
+ Coverage 60.07% 60.64% +0.56%
- Complexity 2262 2279 +17
============================================
Files 607 607
Lines 13071 13078 +7
Branches 912 912
============================================
+ Hits 7853 7931 +78
+ Misses 4792 4709 -83
- Partials 426 438 +12
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From your PR description:
currently, the provisioning method on the listeners is called by the processProvisioning, but it feels like it would be better to have it called by the DeprovisionRequestHandler
Is that a typo: provisioning
should probably be deprovisioning
, right? Assuming that's the case that would mean that the TransferProcessObservable
"leaks" all the way through the ProvisionManager
into the DeprovisionRequestHandler
, which sounds awkward
.../src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/transfer/TransferProcess.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/eclipse/dataspaceconnector/spi/types/domain/transfer/TransferProcess.java
Outdated
Show resolved
Hide resolved
...org/eclipse/dataspaceconnector/transfer/demo/protocols/common/AbstractQueuedProvisioner.java
Outdated
Show resolved
Hide resolved
@paullatzelsperger yes, it was a typo, I fixed it and also the other remarks, thanks |
I had to implement a lease mechanism into the |
ready to review/merge |
...ain/java/org/eclipse/dataspaceconnector/transfer/demo/protocols/stream/DemoTopicManager.java
Outdated
Show resolved
Hide resolved
@paullatzelsperger @algattik is ok for you? |
.../java/org/eclipse/dataspaceconnector/transfer/store/memory/InMemoryTransferProcessStore.java
Outdated
Show resolved
Hide resolved
@jimmarino can this be merged? |
What this PR changes/adds
Migrate all the state transition to the 2-state pattern as described in #825 for
TransferProcessManager
(PRs for
ContractNegotiationManager
s are about to come)Why it does that
Use the 3-state pattern could lead to problems, described in #825
Further notes
now all the states (except
ERROR
,CANCELLED
,ENDED
andSTREAMING
) have theirprocess*
method that permit them to be transitioned to another state.the state
REQUESTED_ACK
has been removed, a newREQUESTING
state has been introducted.the state
DEPROVISIONING_REQ
has been removed.currently, the
deprovisioning
method on the listeners is called by theprocessDeprovisioning
, but it feels like it would be better to have it called by theDeprovisionRequestHandler
I had to implement a lease mechanism into
InMemoryTransferProcessStore
I had to raise the
provisionWait
onAbstractQueueProvisioner
to makeDemoPushStreamTransferTest
run on the CI, it was working locally but not on Actions. It was pretty flaky also before this PR. (e.g: https://github.com/eclipse-dataspaceconnector/DataSpaceConnector/runs/5478021065 on main branch)Linked Issue(s)
#825 (not ready to be closed yet)
Checklist
no-changelog
)