From 2445ab853af7e7c44603c6aaa22bbcc2a72abd90 Mon Sep 17 00:00:00 2001 From: "Matthew D. Groves" Date: Mon, 25 Sep 2023 10:06:43 -0400 Subject: [PATCH] #20 trying compile flag for ScanConsistency in comments data CommentsDataService --- Conduit/Conduit.Web/Articles/Services/CommentsDataService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Conduit/Conduit.Web/Articles/Services/CommentsDataService.cs b/Conduit/Conduit.Web/Articles/Services/CommentsDataService.cs index 816c7d5e12..93fbe0e8ef 100644 --- a/Conduit/Conduit.Web/Articles/Services/CommentsDataService.cs +++ b/Conduit/Conduit.Web/Articles/Services/CommentsDataService.cs @@ -19,7 +19,11 @@ public class CommentsDataService : ICommentsDataService private readonly IConduitCommentsCollectionProvider _commentsCollectionProvider; // a virtual method so it can be overridden by a testing class if necessary +#if DEBUG + protected virtual QueryScanConsistency ScanConsistency => QueryScanConsistency.RequestPlus; +#else protected virtual QueryScanConsistency ScanConsistency => QueryScanConsistency.NotBounded; +#endif public static string GetCommentsKey(string articleKey) => $"{articleKey}::comments";