Project

General

Profile

# Date Author Comment
8450 12/19/2013 02:35 PM Chris Jones

Change CNodeService's archive() and delete() methods to only update Member Nodes in the replica list (not CNs!), since calling CN.archive() again would cause an infinite loop. Thanks for catching this Ben.

8444 12/19/2013 09:35 AM Chris Jones

Update CNodeService.delete() and .archive() to handle situations where the pid is of formatType DATA, and therefore are not registered in the identifier table, and caused NotFound exceptions. For DATA objects, we just update the system metadata now, and for all other objects (METADATA, RESOURCE), we continue to use super.{delete()|archive()}. Also, log the delete/archive into the event log....

8439 12/19/2013 08:13 AM Chris Jones

Remove the broadcastSystemMetadataChange() method since it was a duplicate of notifyReplicaNodes(). Consolidated now.

8360 10/31/2013 01:07 PM Jing Tao

Add the methond named isAuthoritativeMNodeAdmin method. It applies to both CN and MN methods.

8355 10/30/2013 03:37 PM Chris Jones

On calls to archive(), log the correct call (not delete()).

7600 04/20/2013 06:19 PM Chris Jones

Merging the METACAT_2_0_6_BRANCH changes for [M|C]NodeService into the trunk.

7534 04/05/2013 12:38 PM ben leinfelder

allow verification date to be updated for replicas (patch from Skye). https://redmine.dataone.org/issues/3699

7515 03/13/2013 03:13 PM Chris Jones

Set the session to null so that the call uses the CN certificate when calling MN.systemMetadataChanged();

7514 03/13/2013 07:26 AM Chris Jones

To keep all nodes up to date with regard to system metadata changes, add the broadcastSystemMetadataChange() method that finds replica MNs in the node list and calls systemMetadataChanged(). Modify setReplicationStatus() and updateReplicationMetadata() to fire this off when a replica status changes to completed. We may decide to inform MNs at other times too, but this is a conservative amount of calls going to the MNs for now.

7467 12/07/2012 10:39 AM ben leinfelder

make sure to call lock() on the SM when updating rightsholder (like every other method that gets a lock object from HZ).

7464 12/07/2012 10:25 AM ben leinfelder

CN.search() id not implemented by metacat -- making that explicit and also testing for it.

7439 11/29/2012 04:52 PM ben leinfelder

limit /log and /object calls to configurable maximum count for paging. defaults to existing Metacat value of 7000

7420 11/09/2012 10:57 AM Chris Jones

In CNodeService.updateReplicationMetadata(), we are setting the replicaVerifiedDate() when we update or wholesale add a new replica. However, in setReplicationStatus(), we only do so when there's a new entry. Change setReplicationStatus() to also update the replicaVerifiedDate on updates of existing entries to be more consistent with other changes. This affects node prioritization based on this date timestamp. Thanks to Skye for pointing this out.

7401 10/15/2012 02:38 PM Chris Jones

Update d1_common_java and d1_libclient_java to the newest jar files. Add methods to CNodeService to throw NotImplemented exceptions for query(), listQueryEngines(), and getQueryEngineDescription() since these API calls are handled outside of metacat.

7252 06/06/2012 03:14 PM Chris Jones

Oops, previous commit suffered from a happy trigger finger. During deleteReplicationMetadata(), don't delete the replica on the replica Member Node. Call CN.delete() for that functionality. This call just updates sytem metadata (according to the API description).

7251 06/06/2012 03:10 PM Chris Jones
7231 06/02/2012 05:46 AM Chris Jones

In setReplicationStatus() and UpdateReplicationMetadata(), don't allow a status state change from COMPLETED to anything other than INVALIDATED. This prevents the completed status from being overwritten due to race conditions.

7218 05/31/2012 10:56 AM Chris Jones

Throw an exception when NOT allowed, not when allowed =).

7179 05/21/2012 02:31 PM Chris Jones

Add a few logging statemnts for round trip replication metrics.

7171 05/17/2012 12:46 PM ben leinfelder

remove exception from method decl - was not matching the interface def and not compiling.

7148 04/30/2012 03:35 PM ben leinfelder

implement MN and CN.archive() method -- really just the existing delete() methods.
https://redmine.dataone.org/issues/2674
https://redmine.dataone.org/issues/2675

7147 04/30/2012 03:05 PM ben leinfelder

call MN.delete() for each replica when CN.delete() is called
https://redmine.dataone.org/issues/2676

7144 04/25/2012 03:33 PM ben leinfelder

include Session-less interface methods and updated jars that define them.

7142 04/19/2012 02:04 PM ben leinfelder

remove extraneous pid and permission parameters from isAdminAuthorized() method and make public so that it can be called in other locations - namely before our asynchronous replicate() implementation on the MN.

7141 04/19/2012 01:50 PM ben leinfelder

check for empty null (missing) node.subjectList. This should probably be a required element in the D1 schema, but it appears not. (ORNL entry was missing subjects in cn-dev environment)

7140 04/19/2012 11:57 AM ben leinfelder

just use the e.getMessage() as e.getCause() may be null (seeing NPE when testing via the MN IT tester)

7086 03/22/2012 03:14 PM Chris Jones

Also allow MNs to set the FAILED status in setReplicationStatus(). this was an oversight on my part, trying to keep MNs that truly did succeed from overriding the COMPLETED status with FAILED.

7079 03/19/2012 10:12 AM ben leinfelder

use isAdminAuthorized() to check access to CN.create(). Note this method takes a pid and permission parameter and neither is used. Also removed the NotFound exception because it would never come up.

7078 03/19/2012 10:01 AM ben leinfelder

check that caller is CN/admin for CN.delete()
https://redmine.dataone.org/issues/2506

7077 03/19/2012 09:52 AM ben leinfelder

include CN.delete()
https://redmine.dataone.org/issues/2506

7076 03/16/2012 04:07 PM Chris Jones

Notify each replica MN when critical portions of system metadata change so the MN can pull the latest copy into its store. AccessPolicy and RightsHolder changes are the most critical for the MN to keep updated on.

7074 03/15/2012 07:50 PM Chris Jones

Modify CNodeService.setReplicationStatus() slightly to restrict MN-based calls to only set the status to COMPLETED. The CNs should be setting failures or invalidations, or the status can remain at QUEUED or REQUESTED, and the MNAuditTask can revisit those replicas as needed.

7073 03/15/2012 07:14 PM Chris Jones

Add a notifyReplicaNodes() method that calls MNStorage.systemMetadataChanged() on MN replica nodes for a given object identifier. This will be called when there are changes to AccessPolicy and rights holder since these are critical access metadata for an MN, but they can only be changed on the CN.

7071 03/15/2012 12:08 PM Chris Jones

In setReplicationStatus(), first check for a replica target MN subject match with the session subject. If this fails, look to see if CN admin access is allowed. Otherwise throw NotAuthorized. Addresses https://redmine.dataone.org/issues/2494

7068 03/14/2012 12:02 PM Chris Jones

Remove individual calls to isAdminAuthorized() in favor of the centralized isAuthorized() call that handles it now.

7066 03/13/2012 04:00 PM ben leinfelder

check for null Session before continuing with setReplicationStatus()
https://redmine.dataone.org/issues/2476#note-3

7062 03/13/2012 02:19 PM ben leinfelder

throw not authorized when attempting to getReplica as an invalid/non-existent node

7029 02/24/2012 09:46 AM ben leinfelder

throw InvalidToken when an invalid Permission is passed in. THis requires that internal calls to the method also check for this exception.
https://redmine.dataone.org/issues/2388

7012 02/15/2012 09:35 AM Chris Jones

CNodeService.listChecksumAlgorithms() was returning null rather than the list. Fixed.

6934 01/23/2012 11:08 AM ben leinfelder

use RC-1 Dataone jars

6917 01/17/2012 03:17 PM Chris Jones

For MNs that haven't set the archived flag to false on create(), set it here. Also, ensure that the CN sync code sets the authoritative and origin member node fields.

6884 01/11/2012 04:42 PM ben leinfelder

include new methods needed for replication (in new d1 jars)
https://redmine.dataone.org/issues/2203

6883 01/11/2012 01:25 PM ben leinfelder

add method: setObsoletedBy (https://redmine.dataone.org/issues/2185)
augement new method: deleteReplicationMetadata

6881 01/11/2012 11:24 AM ben leinfelder

add method: deleteReplicationMetadata
remove method: assertRelation
update the D1 jars
https://redmine.dataone.org/issues/2187
https://redmine.dataone.org/issues/2158

6876 01/10/2012 05:04 PM Chris Jones

Simplify setReplicationStatus() to not call updateReplicationMetadata() if a replica doesn't exist. Just create it and update the system metadata, which we already have a lock for.

6869 01/09/2012 05:08 PM Chris Jones

Update the CN methods to throw a VersionMismatch where the API changed (where serialVersion is a required parameter). These were previously throwing an InvalidRequest exception.
Change the exception handling for calls to Hazelcast to catch a RuntimeException (not Exception) so we don't catch exceptions that we purposefully throw....

6867 01/07/2012 06:01 PM Chris Jones

Don't lock() on the map.get() in isNodeAuthorized() (this assumes that the CN has queued the task already). Add more lock/unlock debug statements, and fix setReplicationStatus() - I missed a finally statement to unlock the pid.

6866 01/07/2012 12:39 PM Chris Jones

Modify CNReplication methods setReplicationStatus(), updateReplicationMetadata() and setReplicationPolicy() to allow administrative access from a Coordinating Node by calling isAdminAuthorized().

6863 01/06/2012 12:51 PM Chris Jones

In registerSystemMetadata(), lock the pid prior to calling map.containsKey(pid) since a put to the map could occur between the check and the subsequent put().

6859 01/06/2012 07:23 AM Chris Jones

Use Lock instead of ILock to be consistent across classes.

6858 01/05/2012 06:32 PM Chris Jones

After reviewing CNodeService and D1NodeService prompted by Robert comparing the Hazelcast locking with the d1_synchronization locking, I've made a number of changes that will prevent locking problems:

1) Multiple methods contained try/catch blocks that would:...

6805 12/19/2011 01:07 PM ben leinfelder

only attempt to unlock a lock if it was created (in the finally block)

6803 12/16/2011 04:24 PM ben leinfelder

new jars with many changes -- including new CN methods: ping, describe, listChecksumAlgorithm. Removed MN.setAccessPolicy. Refactored CN.setOwner() to CN.setRightsHolder().

6792 12/16/2011 07:29 AM Chris Jones

Change setReplicationStatus() to drop serialVersion and report the failure exception message in the CN log.

6777 12/13/2011 12:22 PM ben leinfelder

updated D1 API -- removed Permission.REPLICATE and associated parameters

6757 12/09/2011 09:05 AM Chris Jones

If a member node cannot be found in the node list matching the targetNodeSubject given in isNodeAuthorized(), throw a ServiceFailure exception.

6717 11/30/2011 02:22 PM Chris Jones

Add log statements for each call to ILock.unlock() for debugging.

6703 11/29/2011 10:10 AM Chris Jones

When using ILock.lock(), get a lock on the string value of the Identifier, not the Identifier object itself. Hazelcast locking won't work otherwise.

6702 11/29/2011 08:55 AM Chris Jones

Use the Hazelcast ILock mechanism to lock the system metadata identifier rather than using IMap.lock(pid).

6688 11/23/2011 10:19 AM ben leinfelder

when comparing D1 Subject objects, use the equals() method not direct string comparison
https://redmine.dataone.org/issues/2050

6687 11/23/2011 10:07 AM ben leinfelder

access nodeList list correctly
https://redmine.dataone.org/issues/2049

6676 11/18/2011 09:10 AM Chris Jones

Use Subject.equals() when comparing DNs rather than CertificateManager.equalsDN(). Don't lock the pid in isNodeAuthorized() to debug for timeout issues. Minor debugging changes.

6665 11/16/2011 06:15 PM Chris Jones

Minor logging for isNodeAuthorized(), and compare subjects properly. Change this to Subject.compareTo() when it is vetted.

6662 11/16/2011 02:27 PM Chris Jones

Catch RuntimeExceptions thrown by Hazelcast as opposed to general Exceptions to we don't catch exceptions we're trying to throw.

6659 11/16/2011 10:45 AM ben leinfelder

generalize exception handling -- add cause detail

6657 11/16/2011 10:34 AM Chris Jones

Changes to setReplicationStatus and isNodeAuthorized(), working out minor bugs in replication.

6656 11/16/2011 09:50 AM ben leinfelder

include exception cause when throwing new exception (combine RuntimeException in Exception handling -- they are almst identical)

6644 11/13/2011 05:47 PM Chris Jones

Calls to setReplicationStatus() can only be made by a CN or the MN that is the target replica node. Implement this service restriction in CNodeService using CertificateManager's equalsDN() method.

6636 11/11/2011 08:58 AM Chris Jones

Added stack trace debugging for CNodeService.isNodeAuthorized() for tracking down replication issues.

6624 11/09/2011 07:14 AM Chris Jones

Fix cast to List<Node> in isNodeAuthorized().

6622 11/08/2011 03:49 PM ben leinfelder

upgrade to 1.0.1-SNAPSHOT DataONE jars

6593 11/02/2011 08:04 PM Chris Jones

Update CNodeService to use the serialVersion parameter and compare it to the current serialVersion of the system metadata found in the hzSystemMetadata map. Throw an InvalidRequest exception if they are not equal. This affects updateReplicationMetadata(), setReplicationStatus(), setReplicationPolicy(), setAccessPolicy(), and setOwner().

6578 11/01/2011 11:54 AM Chris Jones

Add updateReplicationMetadata() to the CN service implementation. This was missing from the API, and likely never called. It fully replaces the given replica item in the list of replicas in system metadata.

6575 11/01/2011 08:54 AM Chris Jones

Minor indentation cleanup.

6571 11/01/2011 06:33 AM Chris Jones

Add setAccessPolicy() to CNodeService since the CN should only make changes to access policies for objects registered with the D1 system. Increment the serial version after locling and getting the most up to fdate system metadata.
Note: CCIT meeting decision says the serial version of the system metadata (during the change) should equal the current serial version, but setAccessPolicy() does not pass in the entire system metadata object, so there's no way to check. For now, increment the latest system metadata from the hzSystemMetadata map.

6570 10/31/2011 04:37 PM Chris Jones

In CNodeService, separate the CN.create() functionality from the MN.create() functionality while still using the superclass to call create(). Deal with Hazelcast locks and setting serial versions only in the CN implementation.

6569 10/31/2011 01:13 PM Chris Jones

Change updateSystemMetadata() to evaluate the incoming system metadata serial version against that found in the hzSystemMetadata map. If they are the same, do the update. If not, throw an InvalidRequest explaining that they need the most current version.

6568 10/29/2011 07:21 PM Chris Jones

Modify CNodeService's registerSystemMetadata() with support for SystemMetadata's serialVersion field. Also, use the hzSystemMetadata map for all system metadata reads using a lock on the pid in order to get the very latest version. This affected isNodeAuthorized(), getChecksum(), and assertRelation(). Since we're using Hazelcast, exceptions are masked as RuntimeException, so throw a ServiceFailure with the underlying message.

6567 10/28/2011 09:46 PM Chris Jones

Modify CNodeService's updateSystemMetadata(), setReplicationStatus(), setReplicationPolicy(), and setOwner() with support for SystemMetadata's serialVersion field. Other methods still pending an update. Use the hzSystemMetadata map for all system metadata reads using a lock on the pid in order to get the very latest version.

6542 10/20/2011 02:03 PM ben leinfelder

add User-Agent logging to support D1 requirements

6495 09/22/2011 10:12 AM ben leinfelder

log errors on create() and registerSM

6484 09/21/2011 04:58 PM Chris Jones

Don't use the hzNodes map yet (as a hazelcast client). Use D1Client instead to get the node list in isNodeAuthorized().

6471 09/20/2011 02:08 PM Matt Jones

Reverting previous @Overrides chanrge from r6470, as that is the desired
behavior under Java 1.6 -- previous versions of Java (e.g., 1.5) will not
comile with this usage of the @Overrides annotation, but the currently
supported version will. So reverting to the 1.6 convention.

6470 09/20/2011 01:36 PM Matt Jones

Removing incorrect @Override annotations that were preventing compilation. The methods marked did not actually override a method in the superclass, so they were not compiling. I think @Overrides was being mistaken for methods that implement an interface but aren't actually in the superclass.

6468 09/20/2011 10:48 AM ben leinfelder

catch runtime exceptions that arise from hazelcast storage errors in the system metadata map

6467 09/20/2011 09:12 AM Chris Jones

Lock the system metadata entry in hzSystemMetadata when calling setReplicationPolicy().

6466 09/20/2011 09:10 AM Chris Jones

Lock the system metadata entry in hzSystemMetadata when calling registerSystemMetadata().

6465 09/20/2011 07:18 AM Chris Jones

Remove references to CNReplicationTask.

6463 09/20/2011 07:12 AM Chris Jones

Change isNodeAuthorized() to query the hzSystemMetadata map rather than the hzPendingreplicationTasks map. The latter isn't needed for authorization since the ReplicationStatus for each Replica in SystemMetadata lists the status of the replica and can be queried.

6455 09/19/2011 10:18 AM ben leinfelder

move CNReplicationTask to the hazelcast package

6449 09/16/2011 03:23 PM ben leinfelder

only "save" to the shared system metadata map - not directly to the table store.

6447 09/16/2011 03:07 PM ben leinfelder

rely on Hazelcast to store the SystemMetadata locally for the node. Entry event listeners store the shared system metadata on their local node when alerted. TODO: remove old replication code that included system metadata xml when replicating scimeta and data

6446 09/16/2011 02:24 PM ben leinfelder

move bulk of the Hazelcast code into HazelcastService from CNodeService so that it is centrall located - easier to manage and configure

6437 09/15/2011 12:57 PM ben leinfelder

initialize Hazelcast from the custom configuration when initializing the Metacat service.

6435 09/15/2011 10:40 AM ben leinfelder

handle entryAdded and entryUpdated the same - update the entry if it exists, otherwise create it

6434 09/15/2011 10:38 AM ben leinfelder

handle entryAdded (to hzSystemMetadata) to store sysmeta to local store when it is not already present

6430 09/14/2011 05:30 PM ben leinfelder

add code to handle new entry when it is not on the local member of the sysmeta cluster

6427 09/14/2011 03:17 PM ben leinfelder

comment out processCluster connections that use hzClient until that is finalized

6419 09/13/2011 04:13 PM ben leinfelder

use pending replication task queue to check if node is authorized for replication. moved from old ReplicationService code

6411 09/11/2011 06:41 PM Chris Jones

Add stub methods in CNodeService that implement the Hazelcast EntryListener interface: entryAdded(), entryRemoved(), entryUpdated(), and entryEvicted(). Add a listener to the hzSystemMetadata map so the CNodeService can respond to those events and create appropriate CNReplicationTask objects for distributed execution across the CN cluster. Again, stubs only so far.