Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix closestGroup race condition in RemoteResourceIndex #239

Merged
merged 1 commit into from
Oct 5, 2015
Merged

Fix closestGroup race condition in RemoteResourceIndex #239

merged 1 commit into from
Oct 5, 2015

Conversation

ato
Copy link
Member

@ato ato commented Apr 19, 2015

Pull request #194 introduced a closestGroup field in RemoteResourceIndex. However the group object is request-specific and so the values should not be shared between multiple threads. The resulting race condition frequently causes intermittent 404 errors preventing resources from loading with this message logged:

Apr 19, 2015 10:52:03 PM org.archive.wayback.webapp.AccessPoint handleReplay
WARNING: (1)LOADFAIL: Self-Redirect: No Closest Match Found /20140309082106/http://catalogue.nla.gov.au/js/barcode.js?1225315091
Apr 19, 2015 10:52:03 PM org.archive.wayback.webapp.AccessPoint logError
WARNING: Runtime Error org.archive.wayback.exception.ResourceNotAvailableException: Self-Redirect: No Closest Match Found

This change replaces the closestGroup field with a local variable thus ensuring it cannot be overwritten by other threads.

Pull #194 introduced a closestGroup field in RemoteResourceIndex.
However the group object is request-specific and so the values
should not be shared between multiple threads.  The resulting race
condition frequently causes intermittent 404 errors preventing
resources from loading with this message logged:

    Apr 19, 2015 10:52:03 PM org.archive.wayback.webapp.AccessPoint handleReplay
    WARNING: (1)LOADFAIL: Self-Redirect: No Closest Match Found /20140309082106/http://catalogue.nla.gov.au/js/barcode.js?1225315091
    Apr 19, 2015 10:52:03 PM org.archive.wayback.webapp.AccessPoint logError
    WARNING: Runtime Error org.archive.wayback.exception.ResourceNotAvailableException: Self-Redirect: No Closest Match Found

This change replaces the closestGroup field with a local variable
thus ensuring it cannot be overwritten by other threads.
@kris-sigur kris-sigur added this to the 2.3.0 Minor Release milestone Sep 28, 2015
johnerikhalse added a commit that referenced this pull request Oct 5, 2015
Fix closestGroup race condition in RemoteResourceIndex
@johnerikhalse johnerikhalse merged commit c343bfe into iipc:master Oct 5, 2015
@ato ato deleted the remote-index-race branch October 6, 2015 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants