Skip to content

Conversation

snadrus
Copy link
Contributor

@snadrus snadrus commented Sep 26, 2025

Benefit:
Compatible configs populate the latest value (with respect to the layers) every 30 seconds on running servers without restarting.

Work Remaining:

  • outfit the first config
  • Ensure docs-gen reports the right type and "Updated instantly." suffix.
  • tests

Decision-Points:

  • 30 seconds poll?

Punchlist (for future PRs):

  • Subsystems
    -- XXMax P4, medium difficulty
  • Fees - all P2, easy
  • Addresses - all P1, hard
  • Proving - all, P4, easy
  • Http - no need
  • Market
    -- StorageMarketConfig
    --- MK12 - all here, P3, easy-ish
    --- IPNI - no need?
  • Indexing - P5, easy
  • PieceLocator - P2, easy
  • Ingest - all, P1, easy
  • Seal - No need
  • APIs->Chain - P2, medium-hard
  • Alerting - P3, easy?
  • Batching - P2, easy

Copy link
Collaborator

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Reads really well, I like how this refreshes fixed values a lot more than having that bloat directly in each instance of Dynamic.

I'd really like to have some Unit tests for the cursed reflect logic, AI should be pretty great at writing that sort of thing.

Also linters are complaining.

}

func (r *cfgRoot) changeMonitor() {
lastTimestamp := time.Now().Add(-30 * time.Second) // plenty of time for start-up
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd prefer some global flag for this. Large storage servers with millions of files on hard drives may need a few minutes for proper startup

func() {
DynamicMx.Lock()
defer DynamicMx.Unlock()
ApplyLayers(context.Background(), r.treeCopy, configs)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Linter somewhat rightfully complains about a missing err check

defer DynamicMx.Unlock()
ApplyLayers(context.Background(), r.treeCopy, configs)
}()
DynamicMx.Lock()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Stray lock?

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