Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339850 - [deltaindexing - jpa] Hash is not updated while modify and visit changed records
Summary: [deltaindexing - jpa] Hash is not updated while modify and visit changed records
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Smila (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Daniel Stucky CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-14 05:04 EDT by Peter Wissel CLA
Modified: 2022-07-07 11:31 EDT (History)
1 user (show)

See Also:


Attachments
log file (90.91 KB, application/octet-stream)
2011-03-14 05:06 EDT, Peter Wissel CLA
no flags Details
possible solution patch (1.35 KB, patch)
2011-03-14 05:11 EDT, Peter Wissel CLA
igor.novakovic: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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