Port Aeron 1.51.0#152
Conversation
strangelydim
commented
May 15, 2026
- Bumped version to 1.51.0; added GIT_SHA to AeronVersion, updated SBE schema to v16
- Ported PersistentSubscription and associated tests, including loss generator tests
- Ported Archive integration tests
- Added ArchiveEvent, SimpleAuthenticator, SimpleAuthorisationService
- Ported Java's async archive client
- Added a few more changes from Java that were missing:
- Added "{CATEGORY} - " prefix to AeronException messages to match Java format
- Misc. other bug fixes: consistent use of same clock when getting timestamps, etc.
345f9f3 to
2115b33
Compare
db548e2 to
ffef216
Compare
- Bumped version to 1.51.0; added GIT_SHA to AeronVersion, updated SBE schema to v16
- Ported PersistentSubscription and associated tests, including loss generator tests
- Ported Archive integration tests
- Added ArchiveEvent, SimpleAuthenticator, SimpleAuthorisationService
- Ported Java's async archive client
- Added a few more changes from Java that were missing:
- Added "{CATEGORY} - " prefix to AeronException messages to match Java format
- Misc. other bug fixes: consistent use of same clock when getting timestamps, etc.
ffef216 to
de85686
Compare
…stant on the left.
mikeb01
left a comment
There was a problem hiding this comment.
I've fixed a bunch of formatting changes. There are a couple of open questions that it would be worth looking at.
| public List<byte[]> ReceivedPayloads { get; } = new(); | ||
| public long Position { get; private set; } | ||
|
|
||
| public void OnFragment(IDirectBuffer buffer, int offset, int length, Header header) |
There was a problem hiding this comment.
The Java version of BufferedFragementHandler implements a FragmentConsumer which is a superset of the controlled and normal fragment handlers where as this uses a normal FragmentHandler only. There are a few places in the Java tests where a controlled poll is used, but in the .Net tests only a poll is used. This may not may any real difference, but it could be worth checking.
There was a problem hiding this comment.
I don't think it made a difference, but I did refactor BufferingFragmentHandler slightly to make it implement IControlledFragmentHandler directly.
| /// message must carry a monotonically increasing id in both the first and last 8 bytes. | ||
| /// Throws if a fragment is missing, duplicated, or corrupted. | ||
| /// </summary> | ||
| internal sealed class MessageVerifier : IFragmentHandler |
There was a problem hiding this comment.
This follows a similar case to the BufferingFragmentHandler. Should be double checked, but may not be a problem.
There was a problem hiding this comment.
Same as above; also refactored to implement IControlledFragmentHandler directly, but I think everything was being tested before as well.
| /// Only meaningful when <see cref="HasFailed"/> returns true. | ||
| /// </summary> | ||
| /// <returns> exception indicating the failure reason, or null if not in the failed state. </returns> | ||
| public Exception FailureReason() |
There was a problem hiding this comment.
Should this be a property.
There was a problem hiding this comment.
Yep, it should. Fixed!
| } | ||
| } | ||
|
|
||
| internal Context ContextInternal() |
There was a problem hiding this comment.
Should this be a property?
There was a problem hiding this comment.
It should, but even better: it should just be deleted. I had it in there for testing earlier before I figured out how we make things "internal" during the Debug build with Fody. Now it's not needed, so deleted!
| return _ctx; | ||
| } | ||
|
|
||
| internal long JoinDifference() |
| @@ -0,0 +1,63 @@ | |||
| /* | |||
There was a problem hiding this comment.
Is it possible for this to be pulled in from the Java implementation rather than have a copy of the source code (not required for merge)?
There was a problem hiding this comment.
This might be able to get refactored in the future... I think a bit of the loss generator changes in Java that were needed to resolve flaky tests actually went in slightly after 1.51.0 was released. So by the time there's a 1.51.1, this should be easier.
…possible, removed no longer used ContextInternal getter, refactored BufferingFragmentHandler a tad for readability.