[IndexCleaner] ignore non-existent entries inside config
ClosedPublic

Authored by poboiko on Jul 19 2019, 11:37 AM.

Details

Summary

If a folder was added to include/excludeFolders and then removed,
there will be a stale entry in the config, for which filePathToId
yields 0. When passed to removeRecursively, it might reinterpret it
as tree root, which is not something we want (although there are
checks for it inside WriteTransaction)

See also D22502: [FileIndexerConfig] skip invalid entries from included/excludedFolders

Diff Detail

Repository
R293 Baloo
Branch
no-indexcleaner-assert (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14129
Build 14147: arc lint + arc unit
poboiko created this revision.Jul 19 2019, 11:37 AM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptJul 19 2019, 11:37 AM
poboiko requested review of this revision.Jul 19 2019, 11:37 AM

Shouldn't we make sure that entries get removed from the config file properly?

bruns added a comment.Jul 19 2019, 3:27 PM

Shouldn't we make sure that entries get removed from the config file properly?

An entry may become valid again.

ngraham accepted this revision.Jul 19 2019, 5:33 PM

Ah, right, of course. Makes sense.

This revision is now accepted and ready to land.Jul 19 2019, 5:33 PM
poboiko closed this revision.Jul 22 2019, 4:44 PM