Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] #3468: Server-side cursor #3621

Merged
merged 4 commits into from
Jul 26, 2023

Conversation

mversic
Copy link
Contributor

@mversic mversic commented Jun 19, 2023

Description

  • disallow deserialization of queries with incorrect signature
  • return iterator over query execution result instead of Vec (iterator is lazy evaluated)
  • add server-side cursor to return query result in batches

Linked issue

Closes #3468

Benefits

Checklist

  • I've read CONTRIBUTING.md
  • I've used the standard signed-off commit format (or will squash just before merging)
  • All applicable CI checks pass (or I promised to make them pass later)
  • (optional) I've written unit tests for the code changes
  • I replied to all comments after code review, marking all implemented changes with thumbs up

@github-actions github-actions bot added the iroha2-dev The re-implementation of a BFT hyperledger in RUST label Jun 19, 2023
@mversic mversic force-pushed the query_optimization branch 5 times, most recently from 452ba7f to 133f667 Compare June 20, 2023 08:36
@mversic mversic force-pushed the query_optimization branch 2 times, most recently from 53e86a1 to 5a589c6 Compare June 20, 2023 09:33
data_model/src/query.rs Show resolved Hide resolved
data_model/src/query.rs Show resolved Hide resolved
data_model/src/query.rs Show resolved Hide resolved
data_model/src/query.rs Show resolved Hide resolved
data_model/src/query.rs Outdated Show resolved Hide resolved
core/src/sumeragi/main_loop.rs Show resolved Hide resolved
core/src/sumeragi/main_loop.rs Show resolved Hide resolved
cli/src/torii/routing.rs Outdated Show resolved Hide resolved
cli/src/torii/routing.rs Show resolved Hide resolved
cli/src/torii/routing.rs Show resolved Hide resolved
client/src/client.rs Outdated Show resolved Hide resolved
core/quang Outdated Show resolved Hide resolved
core/src/queue.rs Outdated Show resolved Hide resolved
core/src/queue.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/account.rs Show resolved Hide resolved
core/src/smartcontracts/isi/account.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/wasm.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/triggers/set.rs Outdated Show resolved Hide resolved
@mversic mversic force-pushed the query_optimization branch 2 times, most recently from e3baddd to 167c58c Compare June 21, 2023 14:02
core/src/kura.rs Show resolved Hide resolved
core/src/sumeragi/main_loop.rs Show resolved Hide resolved
core/src/sumeragi/main_loop.rs Show resolved Hide resolved
Copy link
Contributor

@Erigara Erigara left a comment

Choose a reason for hiding this comment

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

Like the approach.

@mversic mversic force-pushed the query_optimization branch 2 times, most recently from 26519be to e11db37 Compare June 29, 2023 08:23
@mversic mversic force-pushed the query_optimization branch 8 times, most recently from cb68549 to c8e7e29 Compare July 13, 2023 12:53
@mversic mversic force-pushed the query_optimization branch 3 times, most recently from 9518034 to bf7ef4f Compare July 21, 2023 13:47
cli/src/torii/cursor.rs Outdated Show resolved Hide resolved
cli/src/torii/mod.rs Show resolved Hide resolved
cli/src/torii/routing.rs Outdated Show resolved Hide resolved
cli/src/torii/routing.rs Outdated Show resolved Hide resolved
client/src/client.rs Outdated Show resolved Hide resolved
core/src/smartcontracts/isi/triggers/mod.rs Show resolved Hide resolved
data_model/cbindgen.toml Outdated Show resolved Hide resolved
data_model/src/query/pagination.rs Show resolved Hide resolved
data_model/src/query/cursor.rs Show resolved Hide resolved
data_model/src/query/cursor.rs Outdated Show resolved Hide resolved
@mversic mversic force-pushed the query_optimization branch 6 times, most recently from 0e58a88 to a519cef Compare July 21, 2023 18:47
@coveralls
Copy link

coveralls commented Jul 21, 2023

Pull Request Test Coverage Report for Build 5655277817

  • 245 of 898 (27.28%) changed or added relevant lines in 41 files are covered.
  • 3477 unchanged lines in 73 files lost coverage.
  • Overall coverage decreased (-1.6%) to 57.814%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cli/src/stream.rs 0 1 0.0%
cli/src/torii/utils.rs 0 1 0.0%
core/src/smartcontracts/isi/domain.rs 1 2 50.0%
data_model/src/visit.rs 0 1 0.0%
version/derive/src/lib.rs 29 30 96.67%
client/src/http.rs 2 4 50.0%
core/src/kura.rs 4 6 66.67%
data_model/src/query/sorting.rs 1 4 25.0%
client_cli/src/main.rs 0 4 0.0%
core/src/smartcontracts/isi/triggers/mod.rs 0 4 0.0%
Files with Coverage Reduction New Missed Lines %
client_cli/src/main.rs 1 0%
client/src/http_default.rs 1 0%
cli/src/main.rs 1 0%
config/base/src/runtime_upgrades.rs 1 51.72%
core/src/smartcontracts/isi/asset.rs 1 26.01%
core/src/smartcontracts/mod.rs 1 67.86%
core/src/sumeragi/network_topology.rs 1 96.76%
crypto/src/merkle.rs 1 96.23%
data_model/src/account.rs 1 52.21%
data_model/src/domain.rs 1 47.37%
Totals Coverage Status
Change from base Build 5423219773: -1.6%
Covered Lines: 19741
Relevant Lines: 34146

💛 - Coveralls

lints.toml Outdated Show resolved Hide resolved
cli/src/torii/routing.rs Show resolved Hide resolved
cli/src/torii/routing.rs Show resolved Hide resolved
cli/src/torii/routing.rs Show resolved Hide resolved
appetrosyan
appetrosyan previously approved these changes Jul 25, 2023
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
…result

Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
@appetrosyan appetrosyan merged commit 8089ba2 into hyperledger-iroha:iroha2-dev Jul 26, 2023
@mversic mversic deleted the query_optimization branch April 16, 2024 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iroha2-dev The re-implementation of a BFT hyperledger in RUST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants