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
Open
Conversation
8562a9e to
a89ff86
Compare
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue link
https://issues.hibernatingrhinos.com/issue/RDBC-1034
Additional description
RDBC-1034 – Several bugs in index operations fixed:
execute_indexes([])andIndexCreation.create_indexes([])now return early without issuing any request, matching C# behavior. Previously they would log a spurious warning.PutIndexesOperation.set_responsewas doing a substring search on the raw JSON string to detect server errors, silently swallowing actual error payloads asTypeError. Fixed to parse JSON first.GetIndexesOperationhad a typo in the pagination URL (&pageSize{n}instead of&pageSize={n}), causing the server to silently ignore the page size parameter.EnableIndexOperationwas missing theRaftCommandbase class and the correctget_raft_unique_request_idmethod name, making it inconsistent withDisableIndexOperation.Type of change
How risky is the change?
Backward compatibility
Is it platform specific issue?
Documentation update
Documentation Requiredtag.Testing by Contributor
private)Testing by RavenDB QA team
QA Requiredtag.Is there any existing behavior change of other features due to this change?
UI work
Studio Requiredtag.