Skip to content

Conversation

@nmummau
Copy link
Contributor

@nmummau nmummau commented Sep 26, 2025

This fixes issue #427
Also included are is a net9 framework target, and some docker compose cleanup

@nmummau nmummau force-pushed the issue/427 branch 2 times, most recently from eab1b52 to e3ce8bd Compare September 26, 2025 02:17
@alexeyzimarev
Copy link
Contributor

I'd prefer to split those, especially when it comes to docker compose updates. No need to do it with this one, it's ok.

The reason is that I'd definitely accept the fix, but docker compose change seems discussable. Using latest could suddenly break because it will be non-deterministic.

Also, samples don't need two framework targets, one is enough. Using just .NET 9 is fine.

@alexeyzimarev
Copy link
Contributor

Also, where the actual fix? I only see the props file changed to add .NET 9 and the rest is changes in docker compose.

@nmummau nmummau force-pushed the issue/427 branch 5 times, most recently from 0dc79e0 to 06ba2a2 Compare September 27, 2025 13:25
This change resolves a code smell comparing a BIGINT to an INT.
This is safe and the correct thing to do because SqlServerStreamSubscription PrepareCommand() already is handling parsing this to an int:

protected override SqlCommand PrepareCommand(SqlConnection connection, long start)
        => connection.GetStoredProcCommand(Schema.ReadStreamSub)
            .Add("@stream_id", SqlDbType.Int, _streamId)
            .Add("@stream_name", SqlDbType.NVarChar, _streamName)
            .Add("@from_position", SqlDbType.Int, (int)start + 1)
            .Add("@count", SqlDbType.Int, Options.MaxPageSize);
@nmummau
Copy link
Contributor Author

nmummau commented Sep 27, 2025

@alexeyzimarev I rebased and cleaned this up. It's now an isolated fix to fix issue #427, along with an update to the TargetFramework for the samples.

@github-actions
Copy link

Test Results

 15 files  ±0   15 suites  ±0   2h 58m 5s ⏱️ + 2h 20m 56s
224 tests ±0  218 ✅ ±0  0 💤 ±0  6 ❌ ±0 
230 runs  ±0  224 ✅ ±0  0 💤 ±0  6 ❌ ±0 

For more details on these failures, see this check.

Results for commit 7a6be43. ± Comparison against base commit 4f9b060.

This pull request removes 1 and adds 1 tests. Note that renamed tests count towards both.
Eventuous.Tests.Subscriptions.SequenceTests ‑ ShouldReturnFirstBefore(CommitPositionSequence, CommitPosition { Position: 0, Sequence: 2, Timestamp: 2025-09-27T13:06:35.9730876+00:00 })
Eventuous.Tests.Subscriptions.SequenceTests ‑ ShouldReturnFirstBefore(CommitPositionSequence, CommitPosition { Position: 0, Sequence: 2, Timestamp: 2025-09-29T11:45:23.3891513+00:00 })

@alexeyzimarev alexeyzimarev merged commit 106976e into Eventuous:dev Oct 1, 2025
1 of 4 checks passed
nmummau added a commit to nmummau/eventuous that referenced this pull request Oct 11, 2025
* chore: bump samples to use net9.0

* fix(mssql): change from_position to int

This change resolves a code smell comparing a BIGINT to an INT.
This is safe and the correct thing to do because SqlServerStreamSubscription PrepareCommand() already is handling parsing this to an int:

protected override SqlCommand PrepareCommand(SqlConnection connection, long start)
        => connection.GetStoredProcCommand(Schema.ReadStreamSub)
            .Add("@stream_id", SqlDbType.Int, _streamId)
            .Add("@stream_name", SqlDbType.NVarChar, _streamName)
            .Add("@from_position", SqlDbType.Int, (int)start + 1)
            .Add("@count", SqlDbType.Int, Options.MaxPageSize);
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