Skip to content

RDBC-1031 Default CounterOperation.INCREMENT delta to 1#267

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

RDBC-1031 Default CounterOperation.INCREMENT delta to 1#267
redknightlois wants to merge 1 commit intoravendb:v7.1from
redknightlois:RDBC-1031

Conversation

@redknightlois
Copy link
Member

@redknightlois redknightlois commented Feb 26, 2026

Issue link

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

Additional description

CounterOperation.INCREMENT raised a ValueError when delta was omitted, but the C# client defaults it to 1 in that case. Fixed by assigning delta = 1 instead of raising, matching the reference client behaviour.

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

…mitted

C# CounterOperation for INCREMENT defaults delta to 1 when not provided.
Python was raising ValueError instead. Fix assigns delta=1 on the client when delta is None, matching the C# client's permissive default.

Regression test: test_counter_increment_default_delta.py verifies that omitting delta results in total=21 after two increments (explicit 20 + implicit 1).
@redknightlois redknightlois changed the title RDBC-1031: CounterOperation.create_increment(name) without delta raises ValueError - should default to 1 RDBC-1031 Default CounterOperation.INCREMENT delta to 1 Feb 26, 2026
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