Skip to content

[ENH] reject fork_collection for multi-region databases#6400

Merged
rescrv merged 3 commits intomainfrom
rescrv/no-topo-fork
Feb 13, 2026
Merged

[ENH] reject fork_collection for multi-region databases#6400
rescrv merged 3 commits intomainfrom
rescrv/no-topo-fork

Conversation

@rescrv
Copy link
Copy Markdown
Contributor

@rescrv rescrv commented Feb 10, 2026

Description of changes

Multi-region databases (those with a topology prefix in their name) do
not support collection forking. Add a validation check early in the
fork_collection handler to return an InvalidArgumentError before
proceeding with the operation.

Include a test that exercises the rejection path by sending a fork
request with a topology-prefixed database name.

Test plan

Locally the new test passes; CI for the rest.

Migration plan

N/A

Observability plan

N/A

Documentation Changes

N/A

Co-authored-by: AI

@github-actions
Copy link
Copy Markdown

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

@rescrv rescrv changed the title fix: reject fork_collection for multi-region databases [ENH] reject fork_collection for multi-region databases Feb 10, 2026
@propel-code-bot
Copy link
Copy Markdown
Contributor

propel-code-bot bot commented Feb 10, 2026

The integration test now drives the HTTP fork_collection endpoint end to end, confirming that topology-prefixed database requests receive a 400 BAD_REQUEST with the expected InvalidArgument error payload.

Possible Issues

• Debug println! remains in the new test, which may clutter test output.

This summary was automatically generated by @propel-code-bot

@rescrv rescrv force-pushed the rescrv/no-topo-fork branch from 0af14fc to 9d33737 Compare February 11, 2026 19:22
Comment on lines +3441 to +3446
assert_eq!(
response_json["error"],
serde_json::Value::String("InvalidArgumentError".to_string()),
);
println!("response_json: {:?}", response_json);
assert!(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Advisory

[Style] Remove the debug println! statement from the test code. It creates unnecessary noise in the test output.

Context for Agents
Remove the debug `println!` statement from the test code. It creates unnecessary noise in the test output.

File: rust/frontend/src/server.rs
Line: 3446

@blacksmith-sh

This comment has been minimized.

},
)
.await?;
let database_name = DatabaseName::new(&database).ok_or_else(|| {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to make a helper method for this that we can easily use on other unimplemented for MCMR features.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would the method do? You'd need to make the error universally returnable.

@rescrv rescrv force-pushed the rescrv/no-topo-fork branch from 9d33737 to 6ff73ed Compare February 12, 2026 13:42
Multi-region databases (those with a topology prefix in their name) do
not support collection forking. Add a validation check early in the
fork_collection handler to return an InvalidArgumentError before
proceeding with the operation.

Include a test that exercises the rejection path by sending a fork
request with a topology-prefixed database name.

Co-authored-by: AI
@rescrv rescrv force-pushed the rescrv/no-topo-fork branch from 6ff73ed to 22f8357 Compare February 12, 2026 22:29
@blacksmith-sh

This comment has been minimized.

Co-authored-by: propel-code-bot[bot] <203372662+propel-code-bot[bot]@users.noreply.github.com>
@rescrv rescrv merged commit 3688966 into main Feb 13, 2026
67 checks passed
@rescrv rescrv deleted the rescrv/no-topo-fork branch February 13, 2026 17:09
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.

2 participants