From 5e54b42c6c75256816f485987bbd7fffb3804803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Pekr=C3=B3l?= Date: Tue, 6 Aug 2024 17:00:58 +0200 Subject: [PATCH 01/10] RavenDB-22750 IndexTimestamp and LastQueryTime are in UTC so we need to write them in a proper format in JSON --- .../Json/BlittableJsonTextWriterExtensions.cs | 5 ++- test/SlowTests/Issues/RavenDB_22750.cs | 39 +++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 test/SlowTests/Issues/RavenDB_22750.cs diff --git a/src/Raven.Server/Json/BlittableJsonTextWriterExtensions.cs b/src/Raven.Server/Json/BlittableJsonTextWriterExtensions.cs index df20a3660287..875c93b3ff5d 100644 --- a/src/Raven.Server/Json/BlittableJsonTextWriterExtensions.cs +++ b/src/Raven.Server/Json/BlittableJsonTextWriterExtensions.cs @@ -30,6 +30,7 @@ using Raven.Server.Documents.Subscriptions.Stats; using Raven.Server.Utils; using Sparrow; +using Sparrow.Extensions; using Sparrow.Json; using Sparrow.Json.Parsing; using Voron.Data.BTrees; @@ -748,11 +749,11 @@ public static void WriteIncludedCounterNames(this AbstractBlittableJsonTextWrite throw new NotSupportedException($"Cannot write query includes of '{includes.GetType()}' type in '{result.GetType()}'."); writer.WritePropertyName(nameof(result.IndexTimestamp)); - writer.WriteString(result.IndexTimestamp.ToString(DefaultFormat.DateTimeFormatsToWrite)); + writer.WriteString(result.IndexTimestamp.GetDefaultRavenFormat()); writer.WriteComma(); writer.WritePropertyName(nameof(result.LastQueryTime)); - writer.WriteString(result.LastQueryTime.ToString(DefaultFormat.DateTimeFormatsToWrite)); + writer.WriteString(result.LastQueryTime.GetDefaultRavenFormat()); writer.WriteComma(); writer.WritePropertyName(nameof(result.IsStale)); diff --git a/test/SlowTests/Issues/RavenDB_22750.cs b/test/SlowTests/Issues/RavenDB_22750.cs new file mode 100644 index 000000000000..016f14ecb4bd --- /dev/null +++ b/test/SlowTests/Issues/RavenDB_22750.cs @@ -0,0 +1,39 @@ +using System; +using System.Threading.Tasks; +using FastTests; +using Raven.Client.Documents; +using SlowTests.Core.Utils.Entities; +using SlowTests.Core.Utils.Indexes; +using Tests.Infrastructure; +using Xunit; +using Xunit.Abstractions; + +namespace SlowTests.Issues; + +public class RavenDB_22750 : RavenTestBase +{ + public RavenDB_22750(ITestOutputHelper output) : base(output) + { + } + + [RavenFact(RavenTestCategory.Querying)] + public async Task IndexTimestamp_And_LastQueryTime_Needs_To_Have_DateTimeKind_Specified() + { + using (var store = GetDocumentStore()) + { + await new Companies_ByEmployeeLastName().ExecuteAsync(store); + + Indexes.WaitForIndexing(store); + + using (var session = store.OpenAsyncSession()) + { + await session.Query() + .Statistics(out var stats) + .ToListAsync(); + + Assert.Equal(DateTimeKind.Utc, stats.IndexTimestamp.Kind); + Assert.Equal(DateTimeKind.Utc, stats.LastQueryTime.Kind); + } + } + } +} From bb38a7f25c958b52d261d7a58ad6f3edf965c800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Pekr=C3=B3l?= Date: Tue, 6 Aug 2024 16:46:52 +0200 Subject: [PATCH 02/10] RavenDB-22749 removing database after test is completed --- .../Documents/Notifications/ChangesTests.cs | 137 +++++++++--------- 1 file changed, 72 insertions(+), 65 deletions(-) diff --git a/test/SlowTests/Server/Documents/Notifications/ChangesTests.cs b/test/SlowTests/Server/Documents/Notifications/ChangesTests.cs index 3a14cda4ed6f..ce3e2b3a1fbc 100644 --- a/test/SlowTests/Server/Documents/Notifications/ChangesTests.cs +++ b/test/SlowTests/Server/Documents/Notifications/ChangesTests.cs @@ -162,9 +162,9 @@ public async Task CanCreateMultipleNotificationsOnSingleConnection() public async Task NotificationOnWrongDatabase_ShouldNotCrashServer() { using (var store = GetDocumentStore()) - { - var taskObservable = store.Changes("does-not-exists"); - Assert.True( await Assert.ThrowsAsync(async () => await taskObservable.EnsureConnectedNow()).WaitWithoutExceptionAsync(TimeSpan.FromSeconds(15))); + { + var taskObservable = store.Changes("does-not-exists"); + Assert.True(await Assert.ThrowsAsync(async () => await taskObservable.EnsureConnectedNow()).WaitWithoutExceptionAsync(TimeSpan.FromSeconds(15))); // ensure the db still works store.Maintenance.Send(new GetStatisticsOperation()); @@ -210,26 +210,26 @@ public async Task CanGetNotificationAboutDocumentsStartingWith() var taskObservable = store.Changes(); await taskObservable.EnsureConnectedNow(); var observableWithTask = taskObservable.ForDocumentsStartingWith("users/"); - + observableWithTask.Subscribe(x => { if (x.Type == DocumentChangeTypes.Put) list.Add(x.Id); }); await observableWithTask.EnsureSubscribedNow(); - + using (var session = store.OpenSession()) { session.Store(new User(), "users/1"); session.SaveChanges(); } - + using (var session = store.OpenSession()) { session.Store(new User(), "differentDocumentPrefix/1"); session.SaveChanges(); } - + using (var session = store.OpenSession()) { session.Store(new User(), "users/2"); @@ -241,7 +241,7 @@ public async Task CanGetNotificationAboutDocumentsStartingWith() Assert.Contains("users/2", list); } } - + [Fact] public async Task CanGetNotificationAboutDocumentsFromCollection() { @@ -251,26 +251,26 @@ public async Task CanGetNotificationAboutDocumentsFromCollection() var taskObservable = store.Changes(); await taskObservable.EnsureConnectedNow(); var observableWithTask = taskObservable.ForDocumentsInCollection("users"); - + observableWithTask.Subscribe(x => { if (x.Type == DocumentChangeTypes.Put) list.Add(x.Id); }); await observableWithTask.EnsureSubscribedNow(); - + using (var session = store.OpenSession()) { session.Store(new User(), "users/1"); session.SaveChanges(); } - + using (var session = store.OpenSession()) { session.Store(new Employee(), "employees/1"); session.SaveChanges(); } - + using (var session = store.OpenSession()) { session.Store(new User(), "users/2"); @@ -358,83 +358,90 @@ await Assert.ThrowsAsync(async () => await store.Maintenance.Server.SendAsync(new CreateDatabaseOperation(new DatabaseRecord(newDatabaseName))); - using (var session = store.OpenAsyncSession(newDatabaseName)) + try { - await session.StoreAsync(new User + using (var session = store.OpenAsyncSession(newDatabaseName)) { - Name = oldName - }, "users/1"); - await session.SaveChangesAsync(); - } - - using (await store.AggressivelyCacheForAsync(TimeSpan.MaxValue, database: newDatabaseName)) - using (var session = store.OpenAsyncSession(newDatabaseName)) - { - var loaded = await session.LoadAsync("users/1"); - Assert.Equal(oldName, loaded.Name); - } - - using (var session = store.OpenAsyncSession(newDatabaseName)) - { - var loaded = await session.LoadAsync("users/1"); - loaded.Name = newName; - await session.SaveChangesAsync(); - } + await session.StoreAsync(new User + { + Name = oldName + }, "users/1"); + await session.SaveChangesAsync(); + } - var value = await WaitForValueAsync(async () => - { using (await store.AggressivelyCacheForAsync(TimeSpan.MaxValue, database: newDatabaseName)) using (var session = store.OpenAsyncSession(newDatabaseName)) { var loaded = await session.LoadAsync("users/1"); - return loaded.Name; + Assert.Equal(oldName, loaded.Name); } - }, newName); - - Assert.Equal(newName, value); - await store.Maintenance.Server.SendAsync(new DeleteDatabasesOperation(newDatabaseName, hardDelete: true)); + using (var session = store.OpenAsyncSession(newDatabaseName)) + { + var loaded = await session.LoadAsync("users/1"); + loaded.Name = newName; + await session.SaveChangesAsync(); + } - var exception = await WaitForValueAsync(async () => - { - try + var value = await WaitForValueAsync(async () => { using (await store.AggressivelyCacheForAsync(TimeSpan.MaxValue, database: newDatabaseName)) + using (var session = store.OpenAsyncSession(newDatabaseName)) { + var loaded = await session.LoadAsync("users/1"); + return loaded.Name; } + }, newName); - return false; - } - catch (DatabaseDoesNotExistException) + Assert.Equal(newName, value); + + await store.Maintenance.Server.SendAsync(new DeleteDatabasesOperation(newDatabaseName, hardDelete: true)); + + var exception = await WaitForValueAsync(async () => { - return true; - } - }, true); + try + { + using (await store.AggressivelyCacheForAsync(TimeSpan.MaxValue, database: newDatabaseName)) + { + } - Assert.True(exception); + return false; + } + catch (DatabaseDoesNotExistException) + { + return true; + } + }, true); - await store.Maintenance.Server.SendAsync(new CreateDatabaseOperation(new DatabaseRecord(newDatabaseName))); + Assert.True(exception); - using (var session = store.OpenAsyncSession(newDatabaseName)) - { - await session.StoreAsync(new User - { - Name = oldName - }, "users/1"); - await session.SaveChangesAsync(); - } + await store.Maintenance.Server.SendAsync(new CreateDatabaseOperation(new DatabaseRecord(newDatabaseName))); - value = await WaitForValueAsync(async () => - { - using (await store.AggressivelyCacheForAsync(TimeSpan.MaxValue, database: newDatabaseName)) using (var session = store.OpenAsyncSession(newDatabaseName)) { - var loaded = await session.LoadAsync("users/1"); - return loaded.Name; + await session.StoreAsync(new User + { + Name = oldName + }, "users/1"); + await session.SaveChangesAsync(); } - }, oldName); - Assert.Equal(oldName, value); + value = await WaitForValueAsync(async () => + { + using (await store.AggressivelyCacheForAsync(TimeSpan.MaxValue, database: newDatabaseName)) + using (var session = store.OpenAsyncSession(newDatabaseName)) + { + var loaded = await session.LoadAsync("users/1"); + return loaded.Name; + } + }, oldName); + + Assert.Equal(oldName, value); + } + finally + { + await store.Maintenance.Server.SendAsync(new DeleteDatabasesOperation(newDatabaseName, hardDelete: true)); + } } } From 392110c56a17e8889827e67e9d0bd14fa63bd117 Mon Sep 17 00:00:00 2001 From: shaharhikri Date: Wed, 7 Aug 2024 12:13:43 +0300 Subject: [PATCH 03/10] RavenDB-22531 - Add unsupported report status to the exception --- .../ServerWide/Maintenance/ClusterMaintenanceSupervisor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Raven.Server/ServerWide/Maintenance/ClusterMaintenanceSupervisor.cs b/src/Raven.Server/ServerWide/Maintenance/ClusterMaintenanceSupervisor.cs index ebd94a87d8a3..6a4c58aa79ec 100644 --- a/src/Raven.Server/ServerWide/Maintenance/ClusterMaintenanceSupervisor.cs +++ b/src/Raven.Server/ServerWide/Maintenance/ClusterMaintenanceSupervisor.cs @@ -387,7 +387,7 @@ private void UpdateNodeReportIfNeeded(ClusterNodeStatusReport nodeReport, List Date: Wed, 7 Aug 2024 09:53:58 +0200 Subject: [PATCH 04/10] RavenDB-22753 Fixing IndexCreation.CreateIndexes() which ignored SearchEngineType --- .../Indexes/AbstractIndexCreationTask.cs | 2 + .../Documents/Indexes/IndexCreation.cs | 4 ++ test/SlowTests/Issues/RavenDB_22753.cs | 45 +++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 test/SlowTests/Issues/RavenDB_22753.cs diff --git a/src/Raven.Client/Documents/Indexes/AbstractIndexCreationTask.cs b/src/Raven.Client/Documents/Indexes/AbstractIndexCreationTask.cs index 73921db86672..c9821d71a329 100644 --- a/src/Raven.Client/Documents/Indexes/AbstractIndexCreationTask.cs +++ b/src/Raven.Client/Documents/Indexes/AbstractIndexCreationTask.cs @@ -252,6 +252,8 @@ public interface IAbstractIndexCreationTask DocumentConventions Conventions { get; set; } + SearchEngineType? SearchEngineType { get; } + IndexDefinition CreateIndexDefinition(); void Execute(IDocumentStore store, DocumentConventions conventions = null, string database = null); diff --git a/src/Raven.Client/Documents/Indexes/IndexCreation.cs b/src/Raven.Client/Documents/Indexes/IndexCreation.cs index be5c2d05c22c..7b6d3f0408a6 100644 --- a/src/Raven.Client/Documents/Indexes/IndexCreation.cs +++ b/src/Raven.Client/Documents/Indexes/IndexCreation.cs @@ -103,6 +103,10 @@ internal static IndexDefinition[] CreateIndexesToAdd(IEnumerable) indexDefinitions[0].Configuration); + Assert.Equal("Corax", indexDefinitions[0].Configuration[Constants.Configuration.Indexes.IndexingStaticSearchEngineType]); + } + + private class Users_ByName : AbstractIndexCreationTask + { + public Users_ByName() + { + Map = users => from u in users select new { Name = u.Name, LastName = u.LastName }; + + SearchEngineType = Raven.Client.Documents.Indexes.SearchEngineType.Corax; + } + } +} From 86af6633ce40abcf2c19404db8eca05acb28dc5e Mon Sep 17 00:00:00 2001 From: Damian Olszewski Date: Wed, 7 Aug 2024 11:21:22 +0200 Subject: [PATCH 05/10] RavenDB-22599 Reload stats on database switch --- .../database/status/statistics/store/statisticsViewSlice.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Raven.Studio/typescript/components/pages/database/status/statistics/store/statisticsViewSlice.ts b/src/Raven.Studio/typescript/components/pages/database/status/statistics/store/statisticsViewSlice.ts index 4c8ef7f55aeb..ce0d2ca5e884 100644 --- a/src/Raven.Studio/typescript/components/pages/database/status/statistics/store/statisticsViewSlice.ts +++ b/src/Raven.Studio/typescript/components/pages/database/status/statistics/store/statisticsViewSlice.ts @@ -296,7 +296,8 @@ export const statisticsViewSlice = createSlice({ const { initForDatabase, refreshStarted, refreshFinished } = statisticsViewSlice.actions; export const initView = (db: DatabaseSharedInfo) => async (dispatch: AppDispatch, getState: () => RootState) => { - const firstTime = selectEssentialStats(getState()).status === "idle"; + const firstTime = + selectEssentialStats(getState()).status === "idle" || db.name !== getState().statistics.databaseName; if (firstTime) { dispatch(initForDatabase(db.name, DatabaseUtils.getLocations(db))); From 46766a27495496deac923d17f71835ad9462b500 Mon Sep 17 00:00:00 2001 From: Karmel Indych Date: Wed, 7 Aug 2024 09:52:37 +0300 Subject: [PATCH 06/10] RavenDB-20985 create new customSettings for each node --- test/Tests.Infrastructure/ClusterTestBase.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/Tests.Infrastructure/ClusterTestBase.cs b/test/Tests.Infrastructure/ClusterTestBase.cs index 6b16cb17ed66..1223c0a4cf8c 100644 --- a/test/Tests.Infrastructure/ClusterTestBase.cs +++ b/test/Tests.Infrastructure/ClusterTestBase.cs @@ -796,7 +796,7 @@ protected async Task DisposeAndRemoveServer(RavenServer serverToDispose) bool? shouldRunInMemory = null, int? leaderIndex = null, bool useSsl = false, - IDictionary customSettings = null, + IDictionary commonCustomSettings = null, List> customSettingsList = null, bool watcherCluster = false, bool useReservedPorts = false, @@ -820,12 +820,16 @@ protected async Task DisposeAndRemoveServer(RavenServer serverToDispose) for (var i = 0; i < numberOfNodes; i++) { + IDictionary customSettings; if (customSettingsList == null) { - customSettings ??= new Dictionary(DefaultClusterSettings) + customSettings = new Dictionary(commonCustomSettings ?? DefaultClusterSettings); + + var electionKey = RavenConfiguration.GetKey(x => x.Cluster.ElectionTimeout); + if (customSettings.ContainsKey(electionKey) == false) { - [RavenConfiguration.GetKey(x => x.Cluster.ElectionTimeout)] = _electionTimeoutInMs.ToString(), - }; + customSettings[electionKey] = _electionTimeoutInMs.ToString(); + } } else { From 43b50f1c858765997df9f9ee5531cd14e6dc3699 Mon Sep 17 00:00:00 2001 From: Igal Merhavia Date: Tue, 6 Aug 2024 13:19:23 +0300 Subject: [PATCH 07/10] RavenDB-22294 More information to investigate failing test --- .../AtomicClusterReadWriteTests.cs | 12 +++++------ test/SlowTests/Issues/RavenDB-21050.cs | 4 ++-- .../RavenTestBase.Backup.cs | 20 +++++++++++++++++++ 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/test/RachisTests/DatabaseCluster/AtomicClusterReadWriteTests.cs b/test/RachisTests/DatabaseCluster/AtomicClusterReadWriteTests.cs index ff84e9f452c5..c088581c5fbc 100644 --- a/test/RachisTests/DatabaseCluster/AtomicClusterReadWriteTests.cs +++ b/test/RachisTests/DatabaseCluster/AtomicClusterReadWriteTests.cs @@ -249,14 +249,8 @@ public async Task CanRestoreAfterRecreation() var backupStatus3 = await source.Maintenance.SendAsync(new StartBackupOperation(false, backupTaskId)); await backupStatus3.WaitForCompletionAsync(TimeSpan.FromMinutes(5)); - - var backupDir = Directory.GetDirectories(backupPath).First(); - var files = Directory.GetFiles(backupDir) - .Where(BackupUtils.IsBackupFile) - .OrderBackups() - .ToArray(); - Assert.Equal(3, files.Length); + var files = await Backup.GetBackupFilesAndAssertCountAsync(backupPath, 3, source.Database, backupStatus3.Id); var options = new DatabaseSmugglerImportOptions(); DatabaseSmuggler.ConfigureOptionsForIncrementalImport(options); @@ -367,6 +361,8 @@ public async Task ClusterWideTransaction_WhenRestoreFromIncrementalBackupAfterSt var backupStatus2 = await source.Maintenance.SendAsync(new StartBackupOperation(false, backupTaskId)); await backupStatus2.WaitForCompletionAsync(TimeSpan.FromMinutes(5)); + await Backup.GetBackupFilesAndAssertCountAsync(backupPath, 2, source.Database, backupStatus2.Id); + await documentStore.Smuggler.ImportIncrementalAsync(new DatabaseSmugglerImportOptions(), Directory.GetDirectories(backupPath).First()); } @@ -437,6 +433,8 @@ public async Task ClusterWideTransaction_WhenRestoreFromIncrementalBackupAfterSt var backupStatus2 = await source.Maintenance.SendAsync(new StartBackupOperation(false, backupTaskId)); await backupStatus2.WaitForCompletionAsync(TimeSpan.FromMinutes(5)); + await Backup.GetBackupFilesAndAssertCountAsync(backupPath, 2, source.Database, backupStatus2.Id); + await documentStore.Smuggler.ImportIncrementalAsync(new DatabaseSmugglerImportOptions(), Directory.GetDirectories(backupPath).First()); } diff --git a/test/SlowTests/Issues/RavenDB-21050.cs b/test/SlowTests/Issues/RavenDB-21050.cs index 0bae078dcdc3..6626f8a28b61 100644 --- a/test/SlowTests/Issues/RavenDB-21050.cs +++ b/test/SlowTests/Issues/RavenDB-21050.cs @@ -50,6 +50,8 @@ public async Task ClusterWideTransaction_WhenRestoreFromIncrementalBackupAfterSt var backupStatus2 = await source.Maintenance.SendAsync(new StartBackupOperation(false, backupTaskId)); await backupStatus2.WaitForCompletionAsync(TimeSpan.FromMinutes(5)); + await Backup.GetBackupFilesAndAssertCountAsync(backupPath, 2, source.Database, backupStatus2.Id); + var restoreConfig = new RestoreBackupConfiguration { BackupLocation = Directory.GetDirectories(backupPath).First(), DatabaseName = destination.Database }; using (Backup.RestoreDatabase(destination, restoreConfig)) { @@ -59,8 +61,6 @@ public async Task ClusterWideTransaction_WhenRestoreFromIncrementalBackupAfterSt Assert.Null(shouldBeDeleted); //Fails here } } - - } } diff --git a/test/Tests.Infrastructure/RavenTestBase.Backup.cs b/test/Tests.Infrastructure/RavenTestBase.Backup.cs index d722bf43cc80..2f023c9ef34d 100644 --- a/test/Tests.Infrastructure/RavenTestBase.Backup.cs +++ b/test/Tests.Infrastructure/RavenTestBase.Backup.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Linq; using System.Text; using System.Threading; @@ -590,6 +591,25 @@ internal async Task HoldBackupExecutionIfNeededAndInvoke(PeriodicBackupRunner.Te tcs.TrySetResult(null); } } + + public async Task GetBackupFilesAndAssertCountAsync(string backupPath, int count, string databaseName, long backupOpId) + { + var backupDir = Directory.GetDirectories(backupPath).First(); + var filesEnumerable = Directory.GetFiles(backupDir) + .Where(Raven.Client.Documents.Smuggler.BackupUtils.IsBackupFile); + var files = Raven.Client.Documents.Smuggler.BackupUtils.OrderBackups(filesEnumerable).ToArray(); + + if (files.Length != count) + { + using var context = JsonOperationContext.ShortTermSingleUse(); + var database = await _parent.GetDatabase(databaseName); + var operation = database.Operations.GetOperation(backupOpId); + var jsonOperation = context.ReadObject(operation.ToJson(), "backup operation"); + Assert.True(false, $"Expected 3 but found {files.Length}.\n{string.Join("\n", files)}\n{jsonOperation}"); + } + + return files; + } } } } From 868fbf7782280c434334146a8472afe0a3dcdc87 Mon Sep 17 00:00:00 2001 From: Igal Merhavia Date: Wed, 7 Aug 2024 09:50:41 +0300 Subject: [PATCH 08/10] RavenDB-22294 Assert.True(false) -> Assert.Fail() --- test/Tests.Infrastructure/RavenTestBase.Backup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Tests.Infrastructure/RavenTestBase.Backup.cs b/test/Tests.Infrastructure/RavenTestBase.Backup.cs index 2f023c9ef34d..ba40483e3054 100644 --- a/test/Tests.Infrastructure/RavenTestBase.Backup.cs +++ b/test/Tests.Infrastructure/RavenTestBase.Backup.cs @@ -605,7 +605,7 @@ public async Task GetBackupFilesAndAssertCountAsync(string backupPath, var database = await _parent.GetDatabase(databaseName); var operation = database.Operations.GetOperation(backupOpId); var jsonOperation = context.ReadObject(operation.ToJson(), "backup operation"); - Assert.True(false, $"Expected 3 but found {files.Length}.\n{string.Join("\n", files)}\n{jsonOperation}"); + Assert.Fail($"Expected {count} backup files but found {files.Length}.\n{string.Join("\n", files)}\n{jsonOperation}"); } return files; From 7014981fd84e5ec057c3e39ac3fa2616259e6ee6 Mon Sep 17 00:00:00 2001 From: shiranshalom Date: Wed, 7 Aug 2024 12:48:42 +0300 Subject: [PATCH 09/10] RavenDB-22754 - SlowTests.Issues.FilteredReplicationTests.Can_pull_and_push_with_first_cluster_transactions_on_sink --- test/Tests.Infrastructure/ClusterTestBase.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/Tests.Infrastructure/ClusterTestBase.cs b/test/Tests.Infrastructure/ClusterTestBase.cs index d96e8410e101..34915e810779 100644 --- a/test/Tests.Infrastructure/ClusterTestBase.cs +++ b/test/Tests.Infrastructure/ClusterTestBase.cs @@ -529,7 +529,8 @@ public List GetDocumentStores(List nodes, string dat Certificate = certificate, Conventions = { - DisableTopologyUpdates = disableTopologyUpdates + DisableTopologyUpdates = disableTopologyUpdates, + DisposeCertificate = false } }; store.Initialize(); From 9c895b4d00f49120ccdc3d2a92b6880edbe41137 Mon Sep 17 00:00:00 2001 From: shaharhikri Date: Tue, 6 Aug 2024 16:40:21 +0300 Subject: [PATCH 10/10] RavenDB-21914 - ClusterWideTransaction_WhenStoreDocWithEmptyStringId_ShouldThrowInformativeError fails --- .../Commands/ClusterTransactionCommand.cs | 19 +++++++++---------- .../Cluster/ClusterTransactionTests.cs | 8 ++++---- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/Raven.Server/ServerWide/Commands/ClusterTransactionCommand.cs b/src/Raven.Server/ServerWide/Commands/ClusterTransactionCommand.cs index dc465cd56cf9..6a442e280f21 100644 --- a/src/Raven.Server/ServerWide/Commands/ClusterTransactionCommand.cs +++ b/src/Raven.Server/ServerWide/Commands/ClusterTransactionCommand.cs @@ -306,18 +306,17 @@ internal static void ValidateCommands(ArraySegment ContainsRachisException(ex)); - + if (e.InnerException == null) return false; e = e.InnerException;