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

kvutils: Use resources in KeyValueParticipantState, not AutoClo… #4177

Merged
merged 2 commits into from
Jan 23, 2020

Conversation

SamirTalwar
Copy link
Contributor

@SamirTalwar SamirTalwar commented Jan 23, 2020

CHangelog

  • [kvutils] The simplified API now uses com.digitalasset.resources to manage acquiring and releasing resources instead of Closeable.

Pull Request Checklist

  • Read and understand the contribution guidelines
  • Include appropriate tests
  • Set a descriptive title and thorough description
  • Add a reference to the issue this PR will solve, if appropriate
  • Include changelog additions in one or more commit message bodies between the CHANGELOG_BEGIN and CHANGELOG_END tags
  • Normal production system change, include purpose of change in description

NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with /AzurePipelines run to
trigger the build.

CHANGELOG_BEGIN
- [kvutils] The simplified API now uses ``com.digitalasset.resources``
  to manage acquiring and releasing resources instead of ``Closeable``.
CHANGELOG_END
Dispatcher(
"sql-participant-state",
zeroIndex = StartIndex,
headAtInitialization = StartIndex,
Copy link
Contributor

Choose a reason for hiding this comment

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

Always using StartIndex for headAtInitialization will break when starting the ledger with a non-empty non-in-memory database, but it's probably good enough for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, good point, this'll be me not understanding the API correctly. Will fix in a different PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it'd be good to have a conformance test that somehow restarts the ledger and makes sure everything is A-OK.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's not a conformance/ledger api test though, because we cannot remotely restart the ledger. But +1 on having such a test specifically for the KV SQL Ledger.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The conformance test Bazel task knows how to start and stop the ledger, and therefore how to restart it. :-)

Copy link
Contributor

@gerolf-da gerolf-da left a comment

Choose a reason for hiding this comment

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

👍

@SamirTalwar SamirTalwar changed the title kvutils: Use resources in KeyValueParticipantState, not AutoCloseable. kvutils: Use resources in KeyValueParticipantState, not AutoClo… Jan 23, 2020
@SamirTalwar SamirTalwar merged commit e13f9a7 into master Jan 23, 2020
@SamirTalwar SamirTalwar deleted the ledger/participant-state/kvutils/resources branch January 23, 2020 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants