summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RELEASE-NOTES.txt2
-rw-r--r--src/main/java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 0c89e82..010f8b8 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -35,6 +35,8 @@ Carbonado change history
1.1 to 1.1.2
-------------------------------
- Fixed query engine rule which sometimes favored index with incorrect ordering.
+- Fixed replication repair bug which threw an IllegalStateException for insert
+ repair if only alternate keys were specified.
1.1 to 1.1.1
-------------------------------
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<S extends Storable> extends Trigger<S> {
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()) {