-
Notifications
You must be signed in to change notification settings - Fork 2
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
Proper implementation of RecoveryAccessor read operations #138
Comments
This was referenced Apr 7, 2020
killenb
changed the title
Proper implementation of RecoveryAccessor::postRead()
Proper implementation of RecoveryAccessor read operations
Apr 15, 2020
It obviously is a bad sign. I am micro-managing the tickets too much. |
7 tasks
killenb
added a commit
that referenced
this issue
Apr 17, 2020
This was referenced Apr 24, 2020
This ticket has become obsolete with the changes in the spec. The procedure described has changed. It is described in the spec, and implemented already |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Child of #123
I had to split it into two phases. Phase 1 is needed for #130, Phase 2 depends on #130 and #131
Note: Phase 1 has already been implemented!
Description of phase 2:
The implementation of #130 adapted to the changes in DeviceAccess (exceptions are not thrown in the transfers but in the post actions), but it does not fully implement the new specification yet. There are three missing features:
In addition there is the requirement that no new transfers must be started when the device is recovering, which means the non-blocking reads, which obviously cannot call DeviceModule::waitForRecovery() because it blocks, must not simply try to perform the transfer and let it fail.
Implementation
If nothing else is mentioned it is phase 1 and stays in phase 2.
transferAllowed
tranferAllowed
.** Only call _impl->readTransferXxx() if
transferAllowed
is true. If not return withhasNewData
as false.hasException
to truehasException
or!transferAllowed
)hasException
or!transferAllowed
) andpreviousReadFailed
and (TransferType==read or TranferType==readAsync)) or (versionNumber == {nullptr})Also set "hasException" to false once the read succeeds.
Although in phase 1 everything could be done in the catch-block and setOwnerValitiy is always called with true, please implement it like this in preparation of phase 2.
When re-trying to read we always have to use a complete read cycle incl. preRead and postRead because we cannot repeat only the transfer. We are already behind the delegated postRead and have to call the full sequence.
Notice: Instead of
transferAllowed
you cannot useTransferElement::readTransactionInProgress
. If this is false the doPostRead is never called.Sorry, I don't know if it's a good sign that the description of the implementation basically is the code. I always think good code should read like the newspaper.
Definition of done:
The text was updated successfully, but these errors were encountered: