diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2007-08-11 15:31:35 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2007-08-11 15:31:35 +0000 |
commit | 613111cb295aa0a16f12014af99e7e538b4b47ab (patch) | |
tree | 9d7ff24dd091d20a88ea930bce1e2c143aacc60f | |
parent | 57200426df368af9ce98f9d269cac7cdd15a6b93 (diff) |
Fixed replication repair bug which threw an IllegalStateException for insert repair if only alternate keys were specified.
-rw-r--r-- | RELEASE-NOTES.txt | 2 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java | 4 |
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()) {
|