dealing with nested indices processing

Answered

Hi

My plugin had sporadic lockups during indexing, now I'm getting some helpful diagnostic from 2017.2 about nested indices processing, however I don't understand what exactly is happening.  Here are a couple of examples from the stacktraces:

  • code insight calls line marker provider which tries to figure out types hierarchy
  • CachedValueManager on a type def PSI element gets a cache miss and goes to
  • StubIndexImpl.processAllKeys (project, closure)
  • closure calls AbstractStubIndex.get
  • IndexAccessValidator.checkAccessingIndexDuringOtherIndexProcessing -> boom

another one

  • highlighter calls annotator
  • annotator tries to resolve a reference, ResolveCache gets a miss and calls a resolver
  • resolve does another index scan and eventually lands in StubIndexImpl.processAllKeys
  • the rest is the same

So what am I doing wrong? I don't see any nested index processing here.

Thanks

3
2 comments
Avatar
Maxim Mossienko

It looks like a problem in detection of nested index access: StubIndexImpl.processAllKeys counts as stub index access and "closure calls AbstractStubIndex.get" is another (but same) index access

0

Please sign in to leave a comment.