opengrok icon indicating copy to clipboard operation
opengrok copied to clipboard

Incremental history index duplicates records when OpenGroklatestRev does not exist

Open tulinkry opened this issue 6 years ago • 9 comments

When file OpenGroklatestRev does not exist, yet the history cache is created, the incremental index will duplicate all the records in the history cache.

Expected behaviour would be that the existing history cache is overwritten.

tulinkry avatar Mar 29 '19 10:03 tulinkry

I am working on a refactoring of hist so that OpenGrok doesn't have to load a repository's entire history into memory at once. My use case is speeding up the super-slow, full reindexing of freebsd, which has a long history and substantial number of renamings. (Improving handling of renamings as well is covered, as currently OpenGrok does for all files a linear search through the history of renamings; for freebsd that history is hundreds of thousands of files.)

Anyway the problem of this issue will be handled implicitly by my patch.

I hadn't thought to try any de-duplicating when for example OpenGroklatestRev exists but fails to update after an incremental reindexing — but we could think about possibly doing that.

idodeclare avatar Mar 29 '19 23:03 idodeclare

Hi, I am experiencing similar behavior in my instance, any updates on this ?

Leo-Adlakha avatar Feb 16 '23 07:02 Leo-Adlakha

Hi, I am experiencing similar behavior in my instance, any updates on this ?

Can you check if the historycache directory (for given project) contains the OpenGroklatestRev file ?

vladak avatar Feb 22 '23 08:02 vladak

Can you check if the historycache directory (for given project) contains the OpenGroklatestRev file ?

Yes, it contains OpenGroklatestRev file. One more thing to add the duplication seems to be proportional to number of commits being added to the file.

Leo-Adlakha avatar Feb 22 '23 11:02 Leo-Adlakha

Can you check if the historycache directory (for given project) contains the OpenGroklatestRev file ?

Yes, it contains OpenGroklatestRev file. One more thing to add the duplication seems to be proportional to number of commits being added to the file.

Then it's different problem. This is specifically tracking the case when the OpenGroklatestRev file is missing.

vladak avatar Feb 22 '23 11:02 vladak

I think this might be resolved in 1.8.2 We just experienced the same issue and upgrading to 1.8.2 it seems to have gone

msillence avatar Mar 07 '23 17:03 msillence

I think this might be resolved in 1.8.2 We just experienced the same issue and upgrading to 1.8.2 it seems to have gone

That was likely different issue. This one is very specific to the missing file that tracks the latest revision stored in history cache.

vladak avatar Mar 15 '23 12:03 vladak

Do we need to have history enabled to be affected by this bug? I am seeing duplicate search results on 1.9.2, but I'm not sure if this is the issue that I should be monitoring since I don't have history enabled.

dpsi avatar Mar 28 '23 23:03 dpsi

Do we need to have history enabled to be affected by this bug? I am seeing duplicate search results on 1.9.2, but I'm not sure if this is the issue that I should be monitoring since I don't have history enabled.

Yes, this issue tracks a problem that can only happen if history cache is created. Specifically, it happens when the special file is missing, which I think is rare.

vladak avatar Mar 29 '23 08:03 vladak