Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Resolving an issue where we set the properties on the patch object be…

…fore we commit the transaction
  • Loading branch information...
commit 6dc5de6d633d8e858422d03fcdd3e5b0adbd7b7c 1 parent 4931a8d
Ayende Rahien ayende authored
Showing with 10 additions and 4 deletions.
  1. +10 −4 Raven.Database/Extensions/CommandExtensions.cs
14 Raven.Database/Extensions/CommandExtensions.cs
View
@@ -67,8 +67,11 @@ private static void Execute(ICommandData self, DocumentDatabase database, BatchR
var doc = database.Get(patchCommandData.Key, patchCommandData.TransactionInformation);
if (doc != null)
{
- patchCommandData.Metadata = doc.Metadata;
- patchCommandData.Etag = doc.Etag;
+ database.TransactionalStorage.ExecuteImmediatelyOrRegisterForSynchronization(() =>
+ {
+ patchCommandData.Metadata = doc.Metadata;
+ patchCommandData.Etag = doc.Etag;
+ });
}
return;
}
@@ -93,8 +96,11 @@ private static void Execute(ICommandData self, DocumentDatabase database, BatchR
var doc = database.Get(advPatchCommandData.Key, advPatchCommandData.TransactionInformation);
if (doc != null)
{
- advPatchCommandData.Metadata = doc.Metadata;
- advPatchCommandData.Etag = doc.Etag;
+ database.TransactionalStorage.ExecuteImmediatelyOrRegisterForSynchronization(() =>
+ {
+ advPatchCommandData.Metadata = doc.Metadata;
+ advPatchCommandData.Etag = doc.Etag;
+ });
}
return;
}
Please sign in to comment.
Something went wrong with that request. Please try again.