Ladsgroup added subscribers: Tarrow, Jakob_WMDE.
Ladsgroup added a comment.


  This is actually combination of two rather important bugs.
  
  - PrefetchingTermLookup implementation of the old term store 
(`BufferingTermIndexTermLookup`) guarantees methods like `getLabels`, 
`getLabel`, etc. (Methods of TermLookup) would work even the terms are not 
prefetched before (through calling `prefetchTerms`) which makes a lot of sense.
  - PrefetchingTermLookup implementations of the new term store work in the 
same way as well (Basically by prefetching the term first which is noop when 
it's already prefetched, e.g. look at 
`PrefetchingPropertyTermLookup::getTermsOfType`)
  - The problem is in `CachingPrefetchingTermLookup`. `getLabel`, etc. Doesn't 
return anything if you haven't prefetched the term and put them into the cache. 
It shouldn't, It should fallback to the inner lookup.
  
  This is not the case here though, the terms are actually being prefetched 
(not properly though, one by one, but let's not worry about that for now.)
  
  The second problem is the exact opposite. 
`CachingPrefetchingTermLookup::getPrefetched*` looks inside the cache first, 
then returns empty while it should just check the class cache (delegate it to 
internal prefetching term lookup, the internal prefecthing term lookup is 
guaranteed not to do a db query, it just looks it up in the class cache) and 
not memcached, meaning we are doing lots of wasteful requests to memcached 
right now, also causing this bug.
  
  Am I missing something obvious here? @Addshore @Jakob_WMDE @Tarrow ?

TASK DETAIL
  https://phabricator.wikimedia.org/T247196

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Ladsgroup
Cc: Jakob_WMDE, Tarrow, Samantha_Alipio_WMDE, Addshore, Aklapper, CXuesong, 
Hazizibinmahdi, Iflorez, darthmon_wmde, alaa_wmde, Nandana, Lahi, Gq86, 
GoranSMilovanovic, Jayprakash12345, QZanden, LawExplorer, _jensen, rosalieper, 
Scott_WUaS, Jonas, Wong128hk, Wikidata-bugs, aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to