Bug 33576 - History Store has trouble with simultaneous updates
Summary: History Store has trouble with simultaneous updates
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.1 RC2   Edit
Assignee: Debbie Wilson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 3068
  Show dependency tree
 
Reported: 2003-02-28 14:43 EST by Debbie Wilson CLA
Modified: 2003-03-20 12:30 EST (History)
1 user (show)

See Also:


Attachments
Proposed Solution (2.78 KB, patch)
2003-03-03 14:45 EST, Debbie Wilson CLA
no flags Details | Diff
Proposed addition to test suite (4.24 KB, patch)
2003-03-03 14:45 EST, Debbie Wilson CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Debbie Wilson CLA 2003-02-28 14:43:38 EST
This problem has existed forever (well maybe not that long).  If a file has 
more than one history store state for a particular file with the same last 
modified time, these states should be distinguished by a counter.  The logic 
to do this is not working correctly.  As a result, all these states have the 
same file name, the same last modified timestamp and a counter of 0.  The 
offending logic is found in the class HistoryStore, method accept(byte[] key, 
IHistoryStoreVisitor visitor, boolean visitOnPartialMatch).  The if statement:

if (storedKey.length - ILocalStoreConstants.SIZE_KEY_SUFFIX == key.length) {
...

strips the count and lastmodified time off the stored key and them compares 
that length with the key passed in.  The key passed in will have a 
lastmodified time (but not a count) and so this if statement will never be 
true.
Comment 1 Debbie Wilson CLA 2003-03-03 14:45:04 EST
Created attachment 3818 [details]
Proposed Solution
Comment 2 Debbie Wilson CLA 2003-03-03 14:45:26 EST
Created attachment 3819 [details]
Proposed addition to test suite
Comment 3 Debbie Wilson CLA 2003-03-05 16:49:22 EST
Proposed solution and test changes reviewed and released.  These changes 
should be available 20030306+.
Comment 4 Debbie Wilson CLA 2003-03-20 12:30:56 EST
Verified in RC3.