Problem
ClientSchemaGetter#getSchema fetches missing schema IDs synchronously through Admin#getTableSchema, but the fetched schema is not stored in the local schema cache. If callers request the same schema ID again, the client can repeat the same admin metadata request even though the schema was already fetched successfully.
Proposed improvement
Cache schemas fetched through the synchronous fallback path in ClientSchemaGetter#getSchema. This keeps repeated lookups for the same schema ID local after the first successful fetch while preserving the existing latest-schema update behavior.
Benefit
This avoids unnecessary admin metadata calls for repeated schema lookups and makes the synchronous fetch path consistent with cache expectations.
Validation
A focused unit test can verify that two getSchema(schemaId) calls for the same initially missing schema ID only trigger one admin fetch and that latest schema metadata is updated when the fetched schema is newer.
Problem
ClientSchemaGetter#getSchemafetches missing schema IDs synchronously throughAdmin#getTableSchema, but the fetched schema is not stored in the local schema cache. If callers request the same schema ID again, the client can repeat the same admin metadata request even though the schema was already fetched successfully.Proposed improvement
Cache schemas fetched through the synchronous fallback path in
ClientSchemaGetter#getSchema. This keeps repeated lookups for the same schema ID local after the first successful fetch while preserving the existing latest-schema update behavior.Benefit
This avoids unnecessary admin metadata calls for repeated schema lookups and makes the synchronous fetch path consistent with cache expectations.
Validation
A focused unit test can verify that two
getSchema(schemaId)calls for the same initially missing schema ID only trigger one admin fetch and that latest schema metadata is updated when the fetched schema is newer.