Share

Heritrix: Internet Archive Web Crawler

Tracker: Bugs

7 Delete URIs from frontier broken (CachedBdbBigMap.values()?) - ID: 1172183
Last Update: Comment added ( karl-ia )

Symptom: using 'delete URIs matching pattern' from web
UI doesn't seem to work, even though the same 'display'
works fine.

Apparent cause: BdbFrontier.deleteURIs() has line:

Iterator iter = allQueues.values().iterator();

Default implementation of values() is inherited from
AbstractMap, and does not appear to get all values that
are in both 'layers' of CachedBdbBigMap. 'Display'
works because it goes to underlying DB directly;
'delete' goes through subqueues so that per-queue
states can be properly updated as deletes happen.

Implementation of values() in a caching map is
inherently tricky... I marked it and similar operations
as 'unsupported' in the
org.archive.util.IdentityCachingMap (my stab at a map
like CachedBdbBigMap that doesn't use reflection to
access private members).

Options: (1) make values() (and similar methods) work
on CachedBdbBigMap; (2) change BdbFrontier.deleteURIs()
to use another approach that works with CachedBdbBigMap
(and put overrides in CachedBdbBigMap which cause the
unsupported methods to fail-fast rather than give bad
results).



Gordon Mohr ( gojomo ) - 2005-03-28 23:07

7

Closed

Fixed

Gordon Mohr

None

None

Public


Comments ( 2 )

Date: 2007-03-14 00:22
Sender: karl-ia


This issue is now discussed in the new JIRA tracker at
http://webteam.archive.org/jira/browse/HER-381 -- please add further
comments at that location.


Date: 2005-04-12 21:49
Sender: gojomoProject Admin

Logged In: YES
user_id=144912

Fixed via option (2) listed above. Commit comment:

Fix for [ 1172183 ] Delete URIs from frontier broken
(CachedBdbBigMap.values()?)
* CachedBdbMap.java
entrySet() implementation was non-functional: iterator
always returned none, null, unsupported.
Marking entrySet() method as unsupported and removed
flawed implementation that would only hide bugs.
Added workable keySet() implementation that does not
support removes as typical keySet views would.
* BdbFrontier.java
Changed deleteURIs() to iterate over keys (manageable)
rather than entries (unsupported)


Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Open 2005-04-12 21:50 gojomo
resolution_id None 2005-04-12 21:50 gojomo
close_date - 2005-04-12 21:50 gojomo
assigned_to nobody 2005-04-12 00:22 gojomo