From a5d58093859ba34cc5d7010e9a1039acbb1a87b4 Mon Sep 17 00:00:00 2001 From: Shannon Date: Wed, 15 Jul 2015 10:50:01 +0200 Subject: [PATCH] Fixes DatabaseServerMessenger, when an exception occurs, we need to log but we cannot keep trying to process an invalid instruction otherwise we're in an infinite error loop and no further instructions will ever get processed. --- src/Umbraco.Core/Sync/DatabaseServerMessenger.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs index 3064d85a09..4081bfc7c3 100644 --- a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs +++ b/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs @@ -261,10 +261,14 @@ namespace Umbraco.Core.Sync } catch (Exception ex) { - _logger.Error(string.Format("Failed to execute instructions ({0}: \"{1}\").", dto.Id, dto.Instructions), ex); - _logger.Warn("BEWARE - DISTRIBUTED CACHE IS NOT UPDATED."); - throw; - } + _logger.Error( + string.Format("DISTRIBUTED CACHE IS NOT UPDATED. Failed to execute instructions ({0}: \"{1}\"). Instruction is being skipped/ignored", dto.Id, dto.Instructions), ex); + + //we cannot throw here because this invalid instruction will just keep getting processed over and over and errors + // will be thrown over and over. The only thing we can do is ignore and move on. + lastId = dto.Id; + continue; continue; + } } if (lastId > 0)