Skip to content

RDBC-1034 Fix index operations: empty no-op, PutIndexes error parsing, GetIndexes pagination, EnableIndex RaftCommand#276

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

RDBC-1034 Fix index operations: empty no-op, PutIndexes error parsing, GetIndexes pagination, EnableIndex RaftCommand#276
redknightlois wants to merge 1 commit intoravendb:v7.1from
redknightlois:RDBC-1034

Conversation

@redknightlois
Copy link
Member

Issue link

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

Additional description

RDBC-1034 – Several bugs in index operations fixed:

  • execute_indexes([]) and IndexCreation.create_indexes([]) now return early without issuing any request, matching C# behavior. Previously they would log a spurious warning.
  • PutIndexesOperation.set_response was doing a substring search on the raw JSON string to detect server errors, silently swallowing actual error payloads as TypeError. Fixed to parse JSON first.
  • GetIndexesOperation had a typo in the pagination URL (&pageSize{n} instead of &pageSize={n}), causing the server to silently ignore the page size parameter.
  • EnableIndexOperation was missing the RaftCommand base class and the correct get_raft_unique_request_id method name, making it inconsistent with DisableIndexOperation.

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

@redknightlois redknightlois force-pushed the RDBC-1034 branch 2 times, most recently from 8562a9e to a89ff86 Compare March 2, 2026 17:34
…e no-ops; fix PutIndexesOperation, GetIndexesOperation, and EnableIndexOperation

- execute_indexes([]) and IndexCreation.create_indexes([]) return early,
  preventing a spurious "Could not create indexes in one shot" warning log
- PutIndexesOperation raises ValueError for empty args (matches C# ArgumentNullException)
- PutIndexesOperation.set_response: parse JSON before checking for "Error" key;
  the old code did a string substring search then subscripted the raw string,
  causing server errors to be silently swallowed as TypeError
- GetIndexesOperation URL: fixed missing "=" in "&pageSize={n}" parameter
  (was "&pageSize{n}"), which caused the server to silently ignore pagination
- EnableIndexOperation: add RaftCommand base class and rename raft_unique_request_id
  to get_raft_unique_request_id, matching C# IRaftCommand and DisableIndexOperation
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