aquadoggo
aquadoggo copied to clipboard
Replication fails when receiving logs out of order
Internally, replication uses the storage provider publish_entry
method, which checks that logs are published in order. When replicating, logs may be received out of order so a different pathway for storing entries and operations received through replication would solve this.
ERROR aquadoggo::replication::service] Error inserting new entry into db: InvalidLogId(1, 0)
(also this log line should read "Error inserting new entry into db: Requested log id 1 does not match expected log id 0")
Is this about logs or entries in order?
The node refuses to replicate an entry for log 1 because it didn't receive anything for log 0 before that. I first thought huh, that must be trivial, just implement publish_entry
as part of the replication and leave out all of those validations but then it wasn't trivial so I made this issue :D
The node refuses to replicate an entry for log 1 because it didn't receive anything for log 0 before that. I first thought huh, that must be trivial, just implement
publish_entry
as part of the replication and leave out all of those validations but then it wasn't trivial so I made this issue :D
This sounds like similar to a discussion I had with @sandreae in Berlin. The thing is basically: The validation process for the Client API is different from the Node API, we have different guarantees there.
Yeh, we need something new for this, publish_replicated
(or some other amazing name) which will be build from the new validation methods.
Currently I would even say that this is a feature and not a bug 🤣 logs should be received only in order. We would need to discuss this though on spec level ofc.