Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339850

Summary: [deltaindexing - jpa] Hash is not updated while modify and visit changed records
Product: z_Archived Reporter: Peter Wissel <pfreytag>
Component: SmilaAssignee: Daniel Stucky <daniel.stucky>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: igor.novakovic
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
log file
none
possible solution patch igor.novakovic: iplog+

Description Peter Wissel CLA 2011-03-14 05:04:23 EDT
Build Identifier: 

It seems that the hash in database it not updated when set modified and visited flag on changed records. So deltaindexing always compare the current hash value with the one of the initial crawl. This implicate that changed records are market as changed by every following crawl job and is always added to the index.

Reproducible: Always

Steps to Reproduce:
1. Crawl a folder with file (with deltainding full and jpa impl)
2. Record is added
3. Crawl the folder again
4. obsoleteIdIterator could not find any obsolete ids
5. Modify the file.
6. Crawl the folder again
7. Records is added
8. Crawl the folder again
9. Records is added, but should be obsoleteIdIterator could not find any obsolete ids (no record is added).
10. Repeat step 8 - 9 will always add the same record even if it is not changed between two crawl jobs.
Comment 1 Peter Wissel CLA 2011-03-14 05:06:00 EDT
Created attachment 191089 [details]
log file
Comment 2 Peter Wissel CLA 2011-03-14 05:11:18 EDT
Created attachment 191091 [details]
possible solution patch

This patch should fix the problem by updated the hash when modify and visit changed records.
Comment 3 Igor Novakovic CLA 2011-03-17 04:11:34 EDT
Thank you Peter for opening this issue and providing a patch.

@Daniel:
Could you please take a look at this?

Cheers
Igor
Comment 4 Daniel Stucky CLA 2011-03-18 09:03:48 EDT
Hi Peter,

thanks for your contribution. I could reproduce the problem you described easily and also fix it with your proposal. I also improved the JUnit tests to cover the described scenario. Without the fix they failed, with the fix they are successfull.

All is checked into trunk with revision 1016.

Thanks,
Daniel
Comment 5 Andreas Weber CLA 2013-04-15 11:49:44 EDT
Closing this