Skip to content

fix(om): preserve enriched Event Hubs token compatibility on Orleans 10.4 #282

Description

@egil

Release Baseline

All OM packages in this release will consistently require Orleans 10.4.0; the Journaling dependency is 10.4.0-alpha.1. Consumers must upgrade Orleans along with OM. This supersedes the earlier 10.3.1 runtime-compatibility requirement. Preserve persisted-data compatibility and recovery evidence. Optional #283/#284 remain deferred.

Problem

Orleans dotnet/orleans#11155, included in 10.4.0, makes sequence-token equality and ordering depend on a compatibility domain. Derived token types are isolated by default. The two built-in Event Hubs token versions opt into the Event Hubs domain.

OM's EnrichedEventHubSequenceToken : EventHubSequenceTokenV2 does not declare this domain. After upgrading, enriched tokens compare with their own concrete type but cease to compare/equal built-in Event Hubs tokens. This affects stored checkpoints and transitions between standard and enriched adapters, and prevents the provider's historical-token recovery normalization from recognizing enriched tokens.

Work

  • Explicitly opt the enriched token into the Event Hubs numeric domain, using the protected SequenceTokenCompatibilityDomain override returning typeof(EventHubSequenceToken), as upstream's custom-token tests do.
  • Check enriched adapter cache positions, delivered per-event positions, persisted checkpoints and StreamManager resume against 10.4's provider recovery behavior.
  • Exercise the new inherited CreateSequenceTokenForEvent behavior: it now preserves concrete type and metadata via cloning. Retain the enriched batch wrapper's existing custom-container/null-token behavior.
  • Preserve JSON discriminator and Orleans serialization identities. Provider/full StreamId remain the checkpoint identity; token compatibility alone does not make positions from different streams interchangeable.

Acceptance

  • Enriched, EventHubSequenceToken and EventHubSequenceTokenV2 tokens have symmetric equality/ordering and equal hashes at equal numeric positions; sequence number precedes event index.
  • Unrelated provider tokens remain incompatible. Public equality with generic EventSequenceToken stays distinct from the provider's special recovery normalization.
  • Historical exact EventSequenceToken V1 checkpoints recover through the actual 10.4 cache/handshake paths where upstream supports them; do not broaden that rule to arbitrary V2/generic tokens.
  • Per-event tokens retain offset, enqueue time, provider name and traceparent, including inherited factory use and wrapped custom containers.
  • Persisted standard/enriched checkpoint fixtures and provider-qualified tracker resume are covered, along with a genuine cache miss for an evicted position.
  • Event Hubs Release tests pass without warnings on 10.4.

This is a compatibility prerequisite for the Orleans 10.4 dependency upgrade #285.

Reviewed against OM source at 2b5d24614ff08a9028ebc61995308176dbb90841; current main at fcca835c3141ac32874c70f687583d2c49ae4847 differs only in OM's version file.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions