Skip to content

[DEV-747] [DEV-839] [DEV-856] Implement Multi Stream Append#363

Merged
w1am merged 30 commits intomasterfrom
w1am/dev-747-old-net-client-implement-multi-append-with-no-schema
Oct 22, 2025
Merged

[DEV-747] [DEV-839] [DEV-856] Implement Multi Stream Append#363
w1am merged 30 commits intomasterfrom
w1am/dev-747-old-net-client-implement-multi-append-with-no-schema

Conversation

@w1am
Copy link
Copy Markdown
Contributor

@w1am w1am commented Aug 6, 2025

Add support for multi-stream append on the client, matching the server support introduced in version 25.1.

The current limitation is that event data must be valid JSON that can be deserialized into a Dictionary<string, object?>. This is because the new log record properties format is a dictionary. This limitation will be lifted in the next major release of the client, which contains a bunch of developer experience improvements, and allow users to provide their own metadata decoder in the client settings.

This operation takes a list of requests that accept events, along with the expected stream state and stream name. The operation can either fail or succeed, but not both. If it fails, the result will contain a list of failures with additional information, if available.

@linear
Copy link
Copy Markdown

linear bot commented Aug 6, 2025

@w1am w1am force-pushed the w1am/dev-747-old-net-client-implement-multi-append-with-no-schema branch 9 times, most recently from f99d34b to a425f5f Compare August 7, 2025 05:33
@w1am w1am force-pushed the w1am/dev-747-old-net-client-implement-multi-append-with-no-schema branch 3 times, most recently from b52f341 to d2478f9 Compare August 11, 2025 09:30
@w1am w1am requested a review from RagingKore August 11, 2025 09:53
@w1am w1am marked this pull request as ready for review August 11, 2025 12:15
@w1am w1am changed the title [DEV-747] Implement Multi append with no schema registry involved [DEV-747] Implement Multi Stream Append Aug 12, 2025
@w1am w1am force-pushed the w1am/dev-747-old-net-client-implement-multi-append-with-no-schema branch from d2478f9 to 51c576f Compare August 13, 2025 06:15
@w1am w1am changed the title [DEV-747] Implement Multi Stream Append [DEV-747] [DEV-839] Implement Multi Stream Append Aug 13, 2025
@linear
Copy link
Copy Markdown

linear bot commented Aug 13, 2025

Comment thread src/KurrentDB.Client/Core/proto/kurrentdb/protocol/v2/streams/streams_read.proto Outdated
Comment thread src/KurrentDB.Client/Schema/Serialization/Json/JsonSerializer.cs Outdated
Comment thread src/KurrentDB.Client/Core/Interceptors/RequiresLeaderInterceptor.cs
@w1am w1am changed the title [DEV-747] [DEV-839] Implement Multi Stream Append [DEV-747] [DEV-839] [DEV-856] Implement Multi Stream Append Aug 21, 2025
@linear
Copy link
Copy Markdown

linear bot commented Aug 21, 2025

@w1am w1am force-pushed the w1am/dev-747-old-net-client-implement-multi-append-with-no-schema branch 2 times, most recently from 9391117 to 566ba42 Compare October 1, 2025 10:07
@w1am w1am force-pushed the w1am/dev-747-old-net-client-implement-multi-append-with-no-schema branch from 566ba42 to a6ac920 Compare October 1, 2025 10:33
@w1am w1am force-pushed the w1am/dev-747-old-net-client-implement-multi-append-with-no-schema branch from cac8da4 to 336d8d1 Compare October 7, 2025 09:58
@w1am w1am force-pushed the w1am/dev-747-old-net-client-implement-multi-append-with-no-schema branch from 55f983d to 6973d1d Compare October 20, 2025 09:43
@w1am w1am force-pushed the w1am/dev-747-old-net-client-implement-multi-append-with-no-schema branch from 6973d1d to 4e6abb5 Compare October 20, 2025 09:52
@w1am w1am changed the base branch from release/v1.0 to master October 20, 2025 10:21
…t into w1am/dev-747-old-net-client-implement-multi-append-with-no-schema
Copilot AI review requested due to automatic review settings October 20, 2025 10:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements multi-stream append functionality in the client library, matching the server support introduced in version 25.1. The implementation adds support for appending events to multiple streams atomically within a single transaction, with optimistic concurrency control for each stream.

Key changes:

  • Added MultiStreamAppendAsync method and supporting infrastructure for atomic multi-stream appends
  • Introduced new protocol buffer definitions for v2 streams API and error handling
  • Refactored test infrastructure with improved configuration management and simplified Docker container setup
  • Updated dependency versions and reorganized protobuf file structure

Reviewed Changes

Copilot reviewed 97 out of 99 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/KurrentDB.Client/Streams/KurrentDBClient.MultiAppend.cs Core implementation of multi-stream append functionality
src/KurrentDB.Client/Streams/Streams/Model/StreamsClientModel.cs New model types for multi-stream append requests and responses
src/KurrentDB.Client/Streams/Streams/Model/Metadata/MetadataDecoder.cs Metadata decoding utility for JSON-based event metadata
src/KurrentDB.Client/Core/proto/kurrentdb/protocol/v2/streams/streams.proto Protocol buffer definitions for v2 streams service
test/KurrentDB.Client.Tests/Streams/MultiStreamAppendTests.cs Comprehensive tests for multi-stream append functionality
test/KurrentDB.Client.Tests.Common/Fixtures/KurrentDBTemporaryTestNode.cs Refactored test node setup with improved container management
.github/workflows/test.yml New unified test workflow replacing multiple legacy workflows
src/KurrentDB.Client/Core/Exceptions/AppendTransactionMaxSizeExceededException.cs New exception type for transaction size limit violations
Comments suppressed due to low confidence (1)

src/KurrentDB.Client/Streams/Streams/Model/Metadata/MetadataDecoder.cs:1

  • The assertion on line 100 will always fail because metadata[\"NullTimeSpanValue\"] is null (as verified by line 90), and calling GetType() on null will throw a NullReferenceException. The test should either not call GetType() on null values or should skip this assertion when the value is null.
// ReSharper disable InconsistentNaming

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@RagingKore RagingKore requested a review from Copilot October 22, 2025 12:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 97 out of 99 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

src/KurrentDB.Client/Core/proto/kurrent/rpc/rpc.proto:1

  • Corrected spelling of 'propreties' to 'properties'.
// ******************************************************************************************

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread test/KurrentDB.Client.Tests/Streams/AppendTests.cs
Comment thread src/KurrentDB.Client/Streams/KurrentDBClient.MultiAppend.cs Outdated
Comment thread src/KurrentDB.Client/Core/Interceptors/RequiresLeaderInterceptor.cs
Comment thread src/KurrentDB.Client/Core/ValueMapper.cs Outdated
Comment thread src/KurrentDB.Client/Core/Common/ValueExtensions.cs Outdated
Copy link
Copy Markdown
Collaborator

@RagingKore RagingKore left a comment

Choose a reason for hiding this comment

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

LGTM

@w1am w1am merged commit 2112ec6 into master Oct 22, 2025
52 checks passed
@w1am w1am deleted the w1am/dev-747-old-net-client-implement-multi-append-with-no-schema branch October 22, 2025 15:59
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.

3 participants