You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When handling a request for a chunk that the peer does not have, it performs the following:
let chunk = match stacker_dbs.get_chunk(&getchunk.contract_id,
getchunk.slot_id,
getchunk.slot_version,){Ok(Some(chunk)) => chunk,Ok(None) => {// TODO: this is raceyifletOk(Some(actual_version)) =
stacker_dbs.get_slot_version(&getchunk.contract_id, getchunk.slot_id){// request for a stale chunkdebug!("{:?}: NACK StackerDBGetChunk; version mismatch for requested slot {}.{} for {}. Expected {}", local_peer, getchunk.slot_id, getchunk.slot_version, &getchunk.contract_id, actual_version);/* ... etc. */
The call to stacker_dbs.get_chunk(...) and stacker_dbs.get_slot_version(...) need to be transactional, or combined into a single query. A straightforward fix would be to implement a function called get_chunk_or_version(...) which has the same signature as get_chunk(...), but returns the DB's version of the chunk if the given chunk version is not represented.
The text was updated successfully, but these errors were encountered:
When handling a request for a chunk that the peer does not have, it performs the following:
The call to
stacker_dbs.get_chunk(...)
andstacker_dbs.get_slot_version(...)
need to be transactional, or combined into a single query. A straightforward fix would be to implement a function calledget_chunk_or_version(...)
which has the same signature asget_chunk(...)
, but returns the DB's version of the chunk if the given chunk version is not represented.The text was updated successfully, but these errors were encountered: