From 613111cb295aa0a16f12014af99e7e538b4b47ab Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Sat, 11 Aug 2007 15:31:35 +0000 Subject: Fixed replication repair bug which threw an IllegalStateException for insert repair if only alternate keys were specified. --- .../java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java index 7f743ac..7edec6b 100644 --- a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java +++ b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java @@ -303,7 +303,9 @@ class ReplicationTrigger extends Trigger { private void repair(S replica) throws PersistException { replica = (S) replica.copy(); S master = mMasterStorage.prepare(); - replica.copyPrimaryKeyProperties(master); + // Must copy more than just primary key properties to master since + // replica object might only have alternate keys. + replica.copyAllProperties(master); try { if (replica.tryLoad()) { -- cgit v1.2.3