-
Notifications
You must be signed in to change notification settings - Fork 205
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
kvutils: Use resources in KeyValueParticipantState, not AutoClo… #4177
Conversation
CHANGELOG_BEGIN - [kvutils] The simplified API now uses ``com.digitalasset.resources`` to manage acquiring and releasing resources instead of ``Closeable``. CHANGELOG_END
...system/src/main/scala/com/daml/ledger/on/filesystem/posix/FileSystemLedgerReaderWriter.scala
Show resolved
Hide resolved
Dispatcher( | ||
"sql-participant-state", | ||
zeroIndex = StartIndex, | ||
headAtInitialization = StartIndex, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
CHangelog
com.digitalasset.resources
to manage acquiring and releasing resources instead ofCloseable
.Pull Request Checklist
CHANGELOG_BEGIN
andCHANGELOG_END
tagsNOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.