Skip to content

Commit

Permalink
Merge pull request #278 from Holo-Host/read-tx-queue-mgmt
Browse files Browse the repository at this point in the history
[TK-03008] drop read transactions while waiting for new queue work
  • Loading branch information
neonphog committed Aug 6, 2020
2 parents 29df8d1 + 7b327c7 commit 53cfe42
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 11 deletions.
4 changes: 0 additions & 4 deletions crates/dna_util/Cargo.toml
Expand Up @@ -24,7 +24,3 @@ tokio = { version = "0.2", features = [ "full" ] }

[dev-dependencies]
tempdir = "0.3.7"


[patch.crates-io]

Expand Up @@ -51,6 +51,9 @@ pub fn spawn_app_validation_consumer(
tokio::pin!(next_job);
tokio::pin!(kill);

// drop the reader so we don't lock it until the next job!
drop(reader);

if let Either::Left((Err(_), _)) | Either::Right((_, _)) =
futures::future::select(next_job, kill).await
{
Expand Down
Expand Up @@ -50,6 +50,9 @@ pub fn spawn_integrate_dht_ops_consumer(
tokio::pin!(next_job);
tokio::pin!(kill);

// drop the reader so we don't lock it until the next job!
drop(reader);

if let Either::Left((Err(_), _)) | Either::Right((_, _)) =
futures::future::select(next_job, kill).await
{
Expand Down
Expand Up @@ -51,6 +51,9 @@ pub fn spawn_produce_dht_ops_consumer(
tokio::pin!(next_job);
tokio::pin!(kill);

// drop the reader so we don't lock it until the next job!
drop(reader);

if let Either::Left((Err(_), _)) | Either::Right((_, _)) =
futures::future::select(next_job, kill).await
{
Expand Down
Expand Up @@ -49,6 +49,9 @@ pub fn spawn_publish_dht_ops_consumer(
tokio::pin!(next_job);
tokio::pin!(kill);

// drop the reader so we don't lock it until the next job!
drop(reader);

if let Either::Left((Err(_), _)) | Either::Right((_, _)) =
futures::future::select(next_job, kill).await
{
Expand Down
Expand Up @@ -51,6 +51,9 @@ pub fn spawn_sys_validation_consumer(
tokio::pin!(next_job);
tokio::pin!(kill);

// drop the reader so we don't lock it until the next job!
drop(reader);

if let Either::Left((Err(_), _)) | Either::Right((_, _)) =
futures::future::select(next_job, kill).await
{
Expand Down
4 changes: 0 additions & 4 deletions crates/test_utils/wasm/Cargo.toml
Expand Up @@ -22,7 +22,3 @@ tokio_safe_block_on = "0.1.2"
[build-dependencies]
toml = "0.5"
walkdir = "2.3.1"


[patch.crates-io]

3 changes: 0 additions & 3 deletions crates/test_utils/wasm_common/Cargo.toml
Expand Up @@ -14,6 +14,3 @@ holochain_serialized_bytes = "=0.0.41"
serde = "=1.0.104"
serde_bytes = "0.11"
hdk3 = { path = "../../hdk" }

[patch.crates-io]

0 comments on commit 53cfe42

Please sign in to comment.