Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHARD-1167 #341

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft

SHARD-1167 #341

wants to merge 2 commits into from

Conversation

BelfordZ
Copy link
Contributor

No description provided.

This commit introduces a configurable node age calculation system that allows applications to influence node rotation decisions. Key changes include:

- Add NodeRotation.ts with interfaces for custom age calculation

- Modify NodeList.ts to use effective age for rotation ordering

- Add comprehensive logging and monitoring for:

  - Age calculation performance

  - State inconsistencies

  - Sorting anomalies

  - Error conditions

The implementation is designed to:

- Maintain backward compatibility

- Provide detailed debugging information

- Fail gracefully to actual age on errors

- Use deterministic sorting with node ID tiebreaker

Testing Notes:

- Monitor logs for age-inversion and near-equal-ages events

- Watch for slow-age-calculation warnings

- Track sudden-age-change frequency

BREAKING CHANGE: Node rotation order may change if custom age calculation is enabled by the application.
@justin-shardeum justin-shardeum changed the title Shard 1167 SHARD-1167 Dec 5, 2024
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.

1 participant