Merged PR 735973: Upgrade to RocksDbSharp 8.1.1-20230829.3 and remove now-unnecessary hack.

Upgrade to RocksDbSharp 8.1.1-20230829.3 and remove now-unnecessary hack. The new version of the package fixes the issue that requires us to keep a reference of all ` ColumnFamilyOptions` objects in order for them to not be GC'd.

----
## AI-Generated Description
This change:
- Updates the versions of `RocksDbSharp` and `RocksDbNative` NuGet packages in the **config.dsc** file.
- Removes some unused code and comments related to a bug in the RocksDb library in the **RocksDbLifetimeDatabase.cs** file.

Related work items: #2090673
This commit is contained in:
Juan Carlos Guzman Islas 2023-08-30 17:54:19 +00:00
Родитель 9b57800bf0
Коммит 9d087f8e2a
3 изменённых файлов: 4 добавлений и 13 удалений

Просмотреть файл

@ -158,12 +158,6 @@ namespace BuildXL.Cache.BlobLifetimeManager.Library
return new RocksDbLifetimeDatabase(configuration, clock, db);
}
// There is a bug in our RocksDb library that requires that we keep a reference to created ColumnFamilyOptions,
// otherwise an Exception will be thrown with the error:
// A callback was made on a garbage collected delegate of type 'RocksDbSharp!RocksDbSharp.ColumnFamilyOptions+GetMergeOperator::Invoke'.
// Bug#2090673
private static readonly List<ColumnFamilyOptions> Hack = new List<ColumnFamilyOptions>();
protected static RocksDb CreateDb(Configuration configuration)
{
var options = new DbOptions();
@ -200,9 +194,6 @@ namespace BuildXL.Cache.BlobLifetimeManager.Library
columnFamilies.Add(new ColumnFamilies.Descriptor(GetColumnFamilyName(ColumnFamily.Content, namespaceId), contentOptions));
columnFamilies.Add(new ColumnFamilies.Descriptor(GetColumnFamilyName(ColumnFamily.Fingerprints, namespaceId), fingerprintsOptions));
Hack.Add(contentOptions);
Hack.Add(fingerprintsOptions);
}
Directory.CreateDirectory(configuration.DatabasePath);

Просмотреть файл

@ -2634,7 +2634,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "RocksDbNative",
"Version": "8.1.1-20230608.1"
"Version": "8.1.1-20230829.3"
}
}
},
@ -2643,7 +2643,7 @@
"Type": "NuGet",
"NuGet": {
"Name": "RocksDbSharp",
"Version": "8.1.1-20230608.1"
"Version": "8.1.1-20230829.3"
}
}
},

Просмотреть файл

@ -177,11 +177,11 @@ config({
{ id: "Microsoft.Windows.ProjFS", version: "1.2.19351.1" },
// RocksDb
{ id: "RocksDbSharp", version: "8.1.1-20230608.1", alias: "RocksDbSharpSigned",
{ id: "RocksDbSharp", version: "8.1.1-20230829.3", alias: "RocksDbSharpSigned",
dependentPackageIdsToSkip: [ "System.Memory" ],
dependentPackageIdsToIgnore: [ "System.Memory" ]
},
{ id: "RocksDbNative", version: "8.1.1-20230608.1" },
{ id: "RocksDbNative", version: "8.1.1-20230829.3" },
{ id: "JsonDiffPatch.Net", version: "2.1.0" },