Skip to content

RDBC-1032 Operation.wait_for_completion() returns BulkOperationResult#274

Open
redknightlois wants to merge 1 commit intoravendb:v7.1from
redknightlois:RDBC-1032
Open

RDBC-1032 Operation.wait_for_completion() returns BulkOperationResult#274
redknightlois wants to merge 1 commit intoravendb:v7.1from
redknightlois:RDBC-1032

Conversation

@redknightlois
Copy link
Member

Issue link

https://issues.hibernatingrhinos.com/issue/RDBC-1032

Additional description

RDBC-1032Operation.wait_for_completion() previously returned None, making it impossible to inspect the outcome of bulk operations programmatically. It now returns a BulkOperationResult containing the total number of items processed and per-document details, matching the C# IOperationResult contract. The method also accepts an optional timeout and raises TimeoutError if the operation does not complete in time.

Type of change

  • Bug fix
  • Regression bug fix
  • Optimization
  • New feature

How risky is the change?

  • Low
  • Moderate
  • High
  • Not relevant

Backward compatibility

  • Non breaking change
  • Ensured. Please explain how has it been implemented?
  • Breaking change
  • Not relevant

Is it platform specific issue?

  • Yes. Please list the affected platforms.
  • No

Documentation update

  • This change requires a documentation update. Please mark the issue on YouTrack using Documentation Required tag.
  • No documentation update is needed

Testing by Contributor

  • Tests have been added that prove the fix is effective or that the feature works
  • Internal classes added to the test class (e.g. entity or index definition classes) have the lowest possible access modifier (preferable private)
  • It has been verified by manual testing
  • Existing tests verify the correct behavior

Testing by RavenDB QA team

  • This change requires a special QA testing due to possible performance or resources usage implications (CPU, memory, IO). Please mark the issue on YouTrack using QA Required tag.
  • No special testing by RavenDB QA team is needed

Is there any existing behavior change of other features due to this change?

  • Yes. Please list the affected features/subsystems and provide appropriate explanation
  • No

UI work

  • It requires further work in the Studio. Please mark the issue on YouTrack using Studio Required tag.
  • No UI work is needed

- BulkOperationResult deserialized from the operation state Result payload
- Fields: total, documents_processed, attachments_processed, counters_processed,
  time_series_processed, query, details (list of per-document detail dicts)
- message property returns "Processed N items." matching C# IOperationResult contract
- fetch_operations_status() retries up to 10 times (500ms apart) when the server
  returns null state, then raises InvalidOperationException — mirrors C# race-condition
  handling for operations registered after the first poll
- wait_for_completion(timeout) accepts an optional timedelta; raises TimeoutError
  when the operation does not complete within the specified duration; sleep is capped
  to the remaining deadline to avoid overshoot
- details is empty when RetrieveDetails is not set in QueryOperationOptions;
  non-empty when RetrieveDetails=True (mirrors C# RavenDB_2936 test contract)
- Integration test verifies patched documents reflect the updated values
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.

1 participant