Skip to content

Commit

Permalink
Don't check affected rows when deleting task (#461)
Browse files Browse the repository at this point in the history
* Don't check affected rows when deleting task

* Update CHANGELOG

---------

Co-authored-by: Andreas Dzialocha <adzialocha@users.noreply.github.com>
  • Loading branch information
sandreae and adzialocha committed Jul 26, 2023
1 parent 25707ca commit ecc2955
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix race condition when check for existing view ids was too early [#420](https://github.com/p2panda/aquadoggo/pull/420)
- Use fork of `asynchronous-codec` to temporarily fix CBOR decoding bug [#440](https://github.com/p2panda/aquadoggo/pull/440)
- Fix composing of circuit relay address [#451](https://github.com/p2panda/aquadoggo/pull/451)
- Don't check for `affected_rows` on task deletion [#461](https://github.com/p2panda/aquadoggo/pull/461)
- Do not critically fail when view does not exist due to race condition [#460](https://github.com/p2panda/aquadoggo/pull/460)

### Open Sauce
Expand Down
8 changes: 2 additions & 6 deletions aquadoggo/src/db/stores/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl SqlStore {
};

// Remove task from database
let result = query(
query(
"
DELETE FROM
tasks
Expand All @@ -85,11 +85,7 @@ impl SqlStore {
.await
.map_err(|err| SqlStoreError::Transaction(err.to_string()))?;

if result.rows_affected() != 1 {
Err(SqlStoreError::Deletion("tasks".into()))
} else {
Ok(())
}
Ok(())
}

/// Returns "pending" tasks of the materialization service worker.
Expand Down

0 comments on commit ecc2955

Please sign in to comment.