Skip to content

Port Aeron 1.51.0#152

Merged
mikeb01 merged 9 commits into
masterfrom
ebowden/1.51.0-full-squashed
May 21, 2026
Merged

Port Aeron 1.51.0#152
mikeb01 merged 9 commits into
masterfrom
ebowden/1.51.0-full-squashed

Conversation

@strangelydim
Copy link
Copy Markdown
Contributor

  • 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.

@strangelydim strangelydim marked this pull request as draft May 15, 2026 15:49
@strangelydim strangelydim force-pushed the ebowden/1.51.0-full-squashed branch from 345f9f3 to 2115b33 Compare May 15, 2026 15:57
@strangelydim strangelydim marked this pull request as ready for review May 15, 2026 16:07
@strangelydim strangelydim force-pushed the ebowden/1.51.0-full-squashed branch 9 times, most recently from db548e2 to ffef216 Compare May 15, 2026 22:29
- 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.
@strangelydim strangelydim force-pushed the ebowden/1.51.0-full-squashed branch from ffef216 to de85686 Compare May 15, 2026 22:44
Copy link
Copy Markdown
Contributor

@mikeb01 mikeb01 left a comment

Choose a reason for hiding this comment

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

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)
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.

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.

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.

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
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.

This follows a similar case to the BufferingFragmentHandler. Should be double checked, but may not be a problem.

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.

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()
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.

Should this be a property.

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.

Yep, it should. Fixed!

Comment thread src/Adaptive.Archiver/PersistentSubscription.cs
}
}

internal Context ContextInternal()
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.

Should this be a property?

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.

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()
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.

Property?

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.

Yep - fixed!

@@ -0,0 +1,63 @@
/*
Copy link
Copy Markdown
Contributor

@mikeb01 mikeb01 May 19, 2026

Choose a reason for hiding this comment

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

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)?

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.

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.
@strangelydim strangelydim requested a review from mikeb01 May 21, 2026 16:40
@mikeb01 mikeb01 merged commit 634c4fb into master May 21, 2026
4 checks passed
@mikeb01 mikeb01 deleted the ebowden/1.51.0-full-squashed branch May 21, 2026 23:52
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