Project

General

Profile

Actions

Bug #3304

closed

Replication: Timed replication failures occur twice instead of once

Added by Duane Costa over 16 years ago. Updated over 16 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
metacat
Target version:
Start date:
05/19/2008
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
3304

Description

This bug was first described in #3296, however I am opening a separate bug report for it because #3296 is more specific to LTER replication issues, while this bug is general to Metacat.

During a timed replication, documents that fail to replicate are sent a second time for no apparent reason. (Jing said he suspects this is a bug.) For example:

08-04-30 23:09:45 :: document ces_dataset.284.1 sent
08-04-30 23:09:48 :: document ces_dataset.285.1 sent
08-04-30 23:09:49 :: document ces_dataset.288.1 sent
08-04-30 23:09:50 :: document ces_dataset.291.1 sent
08-04-30 23:09:51 :: document ces_dataset.308.1 sent
08-04-30 23:10:01 :: document knb-lter-and.3190.4 sent
08-04-30 23:10:04 :: document knb-lter-and.3234.5 sent
.
.
.
08-05-01 04:26:29 :: document ces_dataset.284.1 sent
08-05-01 04:26:30 :: document ces_dataset.285.1 sent
08-05-01 04:26:31 :: document ces_dataset.288.1 sent
08-05-01 04:26:32 :: document ces_dataset.291.1 sent
08-05-01 04:26:33 :: document ces_dataset.308.1 sent
08-05-01 04:26:43 :: document knb-lter-and.3190.4 sent
08-05-01 04:26:45 :: document knb-lter-and.3234.5 sent

Replication from LTER to KNB takes about eleven hours to complete because of the large number of replication failures (see bug #3296). If documents were sent only once instead of twice, this time could be cut in half.


Related issues

Is duplicate of Metacat - Bug #3303: In KNB server, metacat request two times replication if first replication failed.ResolvedJing Tao05/19/2008

Actions
Actions #1

Updated by Jing Tao over 16 years ago

  • Bug 3303 has been marked as a duplicate of this bug. ***
Actions #2

Updated by Jing Tao over 16 years ago

The bug was fixed.

The problem is in ReplicationHanlder.update() method.
Before,the code looks like:

XMLReader parser;
ReplMessageHandler message = new ReplMessageHandler();
parser = initParser(message);
for (int i=0; i<serverList.size(); i++) {
parser.parse(serverList.elementAt(i).response());

handle(message)

}
So the "message" will accumulate the response (doclist) for every server. If the download failed, the metacat will tried again in next lteration.

if we do this, the problem will be gone since in every iteration, the message object will be intialized and would store the doclist from previous iteration.
for (int i=0; i<serverList.size(); i++) {

XMLReader parser;
ReplMessageHandler message = new ReplMessageHandler();
parser = initParser(message);
parser.parse(serverList.elementAt(i).response());
handle(message)

}

This was tested the replication among dev, ben's local machine and my local machine. It worked.

Actions #3

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 3304

Actions

Also available in: Atom PDF