Page MenuHomePhabricator

Testing for changed refs in repositories with >65K refs misses ref cache
Closed, ResolvedPublic

Description

See PHI1979. During the "discovery" step of import, while testing to see if any ref positions are unknown, a repository with ~200K refs queries them into cache. The cache only holds 65K entries, so the first 65K populate the cache and can be tested quickly, while the other ~130K hit the database one at a time. That is, this should require 4 queries, and actually requires ~130,001 queries.

This can likely be remedied easily by testing refs in blocks that are no larger than the maximum size of the cache.

Related Objects