Skip to content

Cache unchanged extension metadata - #4795

Open
Minecraft0122 wants to merge 1 commit into
plan-player-analytics:masterfrom
Minecraft0122:codex/extension-metadata-cache
Open

Cache unchanged extension metadata#4795
Minecraft0122 wants to merge 1 commit into
plan-player-analytics:masterfrom
Minecraft0122:codex/extension-metadata-cache

Conversation

@Minecraft0122

Copy link
Copy Markdown

Summary

  • fingerprint provider and table schema metadata so repeated data gathering only writes metadata when it changes
  • keep dynamic table rows out of the fingerprint so row changes still write result data without rewriting table definitions
  • key the cache by provider kind, server UUID, plugin, and provider name; no Database instance is retained
  • only inspect/store icons for actual table columns, so the fingerprint code does not need a null-icon branch
  • invalidate optimistic cache entries when the metadata transaction fails or is skipped under heavy load

Review feedback addressed

  • Database is not stored in ExtensionMetadataStorage; DataValueGatherer owns the cache and is recreated when the database changes
  • the icon fingerprint helper has no null branch; unused null table slots are not traversed
  • transaction retry / MySQL 1205 behavior from the closed PR is not included in this branch

Tests

  • unchanged and changed provider metadata
  • independent metadata for different server UUIDs
  • dynamic table rows versus changed table columns
  • skipped and failed metadata transaction invalidation
  • transaction successful-versus-actually-executed state
  • targeted tests and :common:checkstyleMain / :common:checkstyleTest pass locally

This is the extension-metadata portion of the closed #4772, split into a single-purpose PR as requested.

Closes #2755

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.

Reduce amount of extension metadata transactions

1 participant