Skip to content
This repository was archived by the owner on Feb 3, 2023. It is now read-only.

Validation timeout fixes#2199

Merged
zippy merged 16 commits intodevelopfrom
validation-timeout-fixes
Jul 1, 2020
Merged

Validation timeout fixes#2199
zippy merged 16 commits intodevelopfrom
validation-timeout-fixes

Conversation

@zippy
Copy link
Copy Markdown
Member

@zippy zippy commented Jun 26, 2020

PR summary

This PR fixes some long-standing problems in validation:

  • Increases timeout getting headers when building a validation package from the dht (1 second isn't enough)
  • Pending items were being de-queued when processing, which meant that if another request arrived from sim2h (which could happen often under some circumstances), then the same item would be queued multiple times, which could snowball. The solution was to move in-process items to another queue for checking.

And one bug in DHT queries:

  • Fixed DHT queries for ChainHeader entries which were failing because there are no headers for headers stored in the DHT which the code was expecting.

testing/benchmarking notes

( if any manual testing or benchmarking was/should be done, add notes and/or screenshots here )

followups

( any new tickets/concerns that were discovered or created during this work but aren't in scope for review here )

changelog

  • if this is a code change that effects some consumer (e.g. zome developers) of holochain core, then it has been added to our between-release changelog with the format
- summary of change [PR#1234](https://github.com/holochain/holochain-rust/pull/1234)

documentation

@zippy zippy marked this pull request as ready for review July 1, 2020 20:18
@zippy zippy requested a review from maackle July 1, 2020 20:24
Comment thread crates/core/src/dht/actions/remove_queued_holding_workflow.rs
Comment thread crates/core/src/dht/dht_store.rs Outdated
DhtStoreSnapshot {
holding_map: state.dht().get_holding_map().bare().clone(),
queued_holding_workflows: state.dht().queued_holding_workflows.clone(),
in_process_holding_workflows: state.dht().queued_holding_workflows.clone(),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
in_process_holding_workflows: state.dht().queued_holding_workflows.clone(),
in_process_holding_workflows: state.dht().in_process_holding_workflows.clone(),

?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoa! Good catch.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in e67919d

Comment thread crates/core/src/instance.rs
Comment thread crates/core/src/dht/actions/remove_queued_holding_workflow.rs
}
}
HoldingWorkflowQueueing::Done => {
if store.has_exact_in_process_holding_workflow(&self.pending) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can a PendingValidation ever go straight from Waiting (in the holding_queue) to Done? If not, this is fine, but if so, this isn't checking that.

Copy link
Copy Markdown
Collaborator

@maackle maackle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good! Seems like a state machine sort of model, Waiting <=> Processing => Done.

@zippy zippy merged commit 71200ab into develop Jul 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants