@@ -1122,31 +1122,37 @@ def try_flush
1122
1122
if @secondary
1123
1123
if using_secondary
1124
1124
log . warn "got unrecoverable error in secondary." , error : e
1125
+ log . warn_backtrace
1125
1126
backup_chunk ( chunk , using_secondary , output . delayed_commit )
1126
1127
else
1127
1128
if ( self . class == @secondary . class )
1128
1129
log . warn "got unrecoverable error in primary and secondary type is same as primary. Skip secondary" , error : e
1130
+ log . warn_backtrace
1129
1131
backup_chunk ( chunk , using_secondary , output . delayed_commit )
1130
1132
else
1131
1133
# Call secondary output directly without retry update.
1132
1134
# In this case, delayed commit causes inconsistent state in dequeued chunks so async output in secondary is not allowed for now.
1133
1135
if @secondary . delayed_commit
1134
1136
log . warn "got unrecoverable error in primary and secondary is async output. Skip secondary for backup" , error : e
1137
+ log . warn_backtrace
1135
1138
backup_chunk ( chunk , using_secondary , output . delayed_commit )
1136
1139
else
1137
1140
log . warn "got unrecoverable error in primary. Skip retry and flush chunk to secondary" , error : e
1141
+ log . warn_backtrace
1138
1142
begin
1139
1143
@secondary . write ( chunk )
1140
1144
commit_write ( chunk_id , delayed : output . delayed_commit , secondary : true )
1141
1145
rescue => e
1142
1146
log . warn "got an error in secondary for unrecoverable error" , error : e
1147
+ log . warn_backtrace
1143
1148
backup_chunk ( chunk , using_secondary , output . delayed_commit )
1144
1149
end
1145
1150
end
1146
1151
end
1147
1152
end
1148
1153
else
1149
1154
log . warn "got unrecoverable error in primary and no secondary" , error : e
1155
+ log . warn_backtrace
1150
1156
backup_chunk ( chunk , using_secondary , output . delayed_commit )
1151
1157
end
1152
1158
rescue => e
0 commit comments