hashgraph / hashgraph/hedera-hcs-sxc-java
hcs-lib: provide interfaces to enable persistence consistency check and database sync
- Dominant language
- Java
- Stars
- 20
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
**Detailed Description**
If an app-net user disconnects from message queue or messages are not delivered for whatever reason then he doesn't know if he is out of sync. When he starts receiving messages again then there is a gap in his record stream while everyone else is in sync. This problem is more evident if two message queues listen to same topic, each of which queue has its own subscribers, and one queue is down while the other is up and delivering messages. The proposed solution is to create persistence interfaces that scan stored records and returns the gaps in sequence numbers: `findGaps()->[s0, ... ,sN]` where `s` is a sequence number for which we have not received a message. We should be able to broadcast a request `getMessage(seqNo)` to the network and a designated user-role can then automatically relay the message associated with the sequence number.
**Actual Behavior**
In settlements, we may see a settlement net amount whose credit lines don't add up because we failed to receive credit line messages but managed to receive the settlement message.
**Expected Behavior**
No gaps in records.
**Environment:**
- Java: [e.g. OpenJDK 11.0.4]
- Node: [e.g. v12.9.1-x86]
- OS: [e.g. Ubuntu 18.04]
- Version: [e.g. 1.0.1]
**Additional Context**
Add any other context about the problem here. Attach any logs here, if applicable.
Contributor guide
Assessment
This issue has not been assessed yet.