feat(Spanner): Add support for Cloud Queues - #15850
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for Spanner queues by adding Send and Ack command types, updating the command builder and connection classes, and introducing queue-related test fixtures and integration tests. Feedback on the changes highlights syntax errors in the queue creation SQL statement, an integration test that defines commands but never executes or disposes of them, and a public field that should be private and readonly. Additionally, there is a copy-paste error in the XML documentation for CreateSendCommand, and a potential NullReferenceException in a SpannerCommand constructor because the null check on key is executed after the constructor initializer.
6fde46a to
d858058
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for Spanner Queues by adding Send and Ack commands, updating SpannerCommand and SpannerConnection to handle queue operations, and adding integration tests. The review feedback highlights several issues to address, including a syntax error from a trailing comma in the CREATE QUEUE DDL, a code smell from calling an abstract method in a constructor, timezone-related issues from using DateTime.Now instead of DateTime.UtcNow, hardcoded personal test configurations, a potential NullReferenceException when validating Payload, and various copy-paste errors in exception messages and XML documentation.
d858058 to
47daa5d
Compare
085d8cc to
e83cef5
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for Spanner queues by adding 'Send' and 'Ack' command types to SpannerCommand, along with corresponding integration tests and fixtures. The review feedback highlights several critical issues and improvement opportunities: a syntax error (trailing comma) in the queue creation DDL, synchronous blocking in the test fixture setup, a lack of validation for single-key constraints on Send and Ack commands, a potential runtime failure when validating inferred payload types, and missing property copies in the SpannerCommand copy constructor which would break cloning.
f2a5bc7 to
e848450
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for Spanner database queues by adding Send and Ack command types, along with corresponding connection helper methods, test fixtures, and unit/integration tests. However, there are critical issues in the implementation: the state checks validating that exactly one key is provided for Send and Ack mutations are inverted, which will cause runtime failures when valid inputs are provided. Additionally, a trailing comma in the CREATE QUEUE DDL statement in MutationsQueueFixture.cs will result in a syntax error at runtime.
c93a96d to
f57689a
Compare
f57689a to
537c868
Compare
b/422231498
Suggested path for reviewing
SendandAckmethods inSpannerConnection.cs, and then look at the first test of QueueTests.cs` in the integration test project to see a basic usage.SpannerCommand.ExecutableCommandaround lines 400. This is the portion of code that packages theSendandAckmutations into the protobuf message wire typeCreateSendCommandpublic method down to the part that prepares the mutation protobuf types from above