summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java17
1 files changed, 17 insertions, 0 deletions
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 ce0ce53..4b01679 100644
--- a/src/main/java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java
+++ b/src/main/java/com/amazon/carbonado/repo/replicated/ReplicationTrigger.java
@@ -306,6 +306,23 @@ class ReplicationTrigger<S extends Storable> extends Trigger<S> {
// Insert new entry.
if (masterEntry != null && newReplicaEntry != null) {
if (!newReplicaEntry.tryInsert()) {
+ /*
+ log.warn("Unable to insert: " + newReplicaEntry);
+ Storable copy = newReplicaEntry.copy();
+ if (copy.tryLoad()) {
+ log.warn("Blocked by: " + copy);
+ } else {
+ log.warn("Nothing loaded");
+ try {
+ newReplicaEntry.insert();
+ } catch (Exception e) {
+ log.warn("Still cannot insert", e);
+ return;
+ }
+ }
+ */
+
+ // FIXME: can be caused by alt key constraint
// Try to correct bizarre corruption.
newReplicaEntry.tryDelete();
newReplicaEntry.tryInsert();