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

iterator: improve and document error handling #97

Merged
merged 4 commits into from
May 18, 2020

Conversation

erikgrinaker
Copy link
Contributor

@erikgrinaker erikgrinaker commented May 15, 2020

The iterator pattern we're using typically panics on use of invalid iterators (including our backends). I've kept this pattern, but tried to reduce the amount of panics and return via Error() instead, and also made Close() panic.

Our iterator examples did not include checking Error(), so this is likely to break many applications that today rely on iterator panics for error handling (e.g. IAVL, see cosmos/iavl#247).

Branched off of #96.

@erikgrinaker erikgrinaker added the T:breaking Type: Breaking label May 15, 2020
@erikgrinaker erikgrinaker requested a review from tessr as a code owner May 15, 2020 16:39
@erikgrinaker erikgrinaker self-assigned this May 15, 2020
@erikgrinaker erikgrinaker changed the base branch from erik/batch-error to master May 18, 2020 11:33
@erikgrinaker erikgrinaker merged commit 4b93d0b into master May 18, 2020
@tac0turtle tac0turtle deleted the erik/iterator-error branch May 18, 2020 12:18
nddeluca pushed a commit to Kava-Labs/tm-db that referenced this pull request Jan 8, 2024
* build(deps): bump github.com/linxGnu/grocksdb from 1.7.16 to 1.8.6

Bumps [github.com/linxGnu/grocksdb](https://github.com/linxGnu/grocksdb) from 1.7.16 to 1.8.6.
- [Release notes](https://github.com/linxGnu/grocksdb/releases)
- [Commits](linxGnu/grocksdb@v1.7.16...v1.8.6)

---
updated-dependencies:
- dependency-name: github.com/linxGnu/grocksdb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use OS-provided cleveldb instead of manually building

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Use latest versio of RocksDB

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add changelog entry

Signed-off-by: Thane Thomson <connect@thanethomson.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T:breaking Type: Breaking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants