-
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
[DPP-1022] ACS active_at_offset #15764
Conversation
dfea01b
to
d81ada0
Compare
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.
Thanks @pbatko-da . This is great functionality to have!
I'm not approving, as I'd like one of your team to review Scala code.
FYI: @arne-da @cocreature : note that this enables us to ingest audit-logs backed by historical ACS snapshots.
@@ -38,23 +38,26 @@ message GetActiveContractsRequest { | |||
// In particular, setting the verbose flag to true triggers the ledger to include labels for record fields. | |||
// Optional | |||
bool verbose = 3; | |||
|
|||
// The offset at which the snapshot of the active contracts will be computed. | |||
// Must be no greater than the current ledger end offset. |
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 assume it has to be greater than the latest pruning offset? Otherwise it seems like you'll omit contracts that have been active at the specified offset but have been archived before the pruning interval.
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.
Current implementation allows active_at offset that is greater than or equal to the pruning offset.
Added conformance tests verifying that and a note in the proto file
changelog_begin Ledger API: Add active_at_offset to the GetActiveContractsRequest request changelog_end
e4c8b2b
to
767b11c
Compare
Is there any chance we would be able to get the As discussed here, we currently have to wait until the last GRPC message to know the offset (if we requested |
@lucianojoublanc-da My instinct would be to modify the behavior of the already existing @cocreature Why would it be a breaking change? Current description [1] leaves it unspecified what is the content of the If wonder if we could lose any useful semantics if we start populating [1] Current description of the offset field:
|
@lucianojoublanc-da : why do you need to see the offset in the response at all with this change? I am under the assumption that with this change the caller chooses the offset up front (e.g., using a call to |
If you submit a call to There's also the fact that the spec is somewhat ambiguous in this regard : I don't think it actually says that you'll get back the same offset that you set in the request .. |
I agree with you, that would be my preference, but I think that in practice there will be people who have coded up their client based on what they observe when e.g. calling the sandbox, and this would break that behaviour. |
...uites/src/main/scala/com/daml/ledger/api/testtool/suites/v1_8/ActiveContractsServiceIT.scala
Outdated
Show resolved
Hide resolved
ledger/participant-integration-api/src/main/scala/platform/ApiOffset.scala
Show resolved
Hide resolved
Code from this PR combined with the getLedgerEnd call is fixing the UX that Luciano has pointed out. |
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.
Left few minor comments, otherwise LGTM
@meiersi-da - correct |
changelog_begin
Ledger API: Add active_at_offset to the GetActiveContractsRequest request
changelog_end