Skip to content

perf: move the hourly estate reconcile 45 minutes off the shared hourly tick - #41

Merged
XxFran10xX merged 1 commit into
mainfrom
perf/hourly-offset
Nov 6, 2026
Merged

XxFran10xX merged 1 commit into
mainfrom
perf/hourly-offset

Conversation

@XxFran10xX

@XxFran10xX XxFran10xX commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

CharacterQueueEstate.reconcile (about 90 ms on Main, mostly fsync in QueueFiles.write) ran at enable + 1 h and hourly after. That is the tick most plugins' hourly estate passes share, with the RPCharacters coordinator on the tick before.

  • The boot pass still runs on the first tick.
  • The hourly passes now start at 1 h 45 min and repeat every hour, the same pattern Archaeo uses with a 15-minute offset.

Nothing players see depends on this timing: RPCharacters' coordinator settles participants itself when an estate is decided and retries hourly. The participant's own pass only backs that up.

Tests

QueueEstateTest checks the boot pass at tick 1, the hourly timer at 126,001 / 72,000, that nothing else is scheduled, and that both tasks run reconcile.

No gameplay change.

Dev test

Dev (TFMCDev01, 11-05): "Recycler enabled.", no estate warnings.

🤖 Generated with Claude Code

…ly tick

CharacterQueueEstate.reconcile (about 90 ms on Main, mostly fsync) ran at
enable + 1 h and hourly after, the tick most plugins' hourly estate passes
share (RPCharacters' coordinator runs the tick before). The boot pass still
runs on the first tick; the hourly passes now start at 1 h 45 min and repeat
every hour, the same pattern Archaeo uses with a 15 minute offset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Improvements
    • Estate reconciliation now runs shortly after startup and follows an hourly schedule. This separates the initial check from recurring checks, which begin later and repeat at regular hourly intervals. The updated timing provides distinct startup and ongoing reconciliation runs.

CharacterQueueEstate now schedules a one-tick boot reconciliation and a separate hourly reconciliation. The hourly task starts after the configured delay and repeats every 72,000 ticks. The test checks both schedules and confirms that both tasks call Estates.decided().

Changes: Queue estate reconciliation

Layer / File(s) Summary
Schedule boot and hourly reconciliation
src/main/java/net/tfminecraft/recycler/ownership/CharacterQueueEstate.java, src/test/java/net/tfminecraft/recycler/ownership/QueueEstateTest.java
CharacterQueueEstate.start schedules a one-tick boot task and an hourly task with the configured initial delay and repeat period. The test checks both schedules and verifies that each task calls Estates.decided().

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Refactor

Suggested reviewers: ryanbarlow97

Merge Risk: Minimal · up to 32452

The scheduling change is ready to merge after normal checks.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: eac3e8e7-0802-4785-b964-2b54a9a59494
Commits

Reviewing files that changed from the base of the PR and between c67bf34 and 32452c8.

Files selected for processing: 2

  • src/main/java/net/tfminecraft/recycler/ownership/CharacterQueueEstate.java
  • src/test/java/net/tfminecraft/recycler/ownership/QueueEstateTest.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@github-actions github-actions Bot added the size:XS 0-9 effective changed lines (tests excluded in mixed PRs). label Nov 5, 2026
@XxFran10xX
XxFran10xX marked this pull request as ready for review November 6, 2026 14:27
@XxFran10xX

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Action performed

Full review finished.

@XxFran10xX
XxFran10xX merged commit 085caf3 into main Nov 6, 2026
4 checks passed
@XxFran10xX
XxFran10xX deleted the perf/hourly-offset branch November 6, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant