|
|
|
@ -100,6 +100,8 @@ namespace ZeroLevel.Services.PartitionStorage
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public IEnumerable<StorePartitionKeyValueSearchResult<TKey, TValue>> Iterate()
|
|
|
|
|
{
|
|
|
|
|
if (Directory.Exists(_catalog))
|
|
|
|
|
{
|
|
|
|
|
TKey k;
|
|
|
|
|
TValue v;
|
|
|
|
@ -124,6 +126,7 @@ namespace ZeroLevel.Services.PartitionStorage
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public IEnumerable<StorePartitionKeyValueSearchResult<TKey, TValue>> IterateKeyBacket(TKey key)
|
|
|
|
|
{
|
|
|
|
|
TKey k;
|
|
|
|
@ -203,6 +206,8 @@ namespace ZeroLevel.Services.PartitionStorage
|
|
|
|
|
TKey k;
|
|
|
|
|
TValue v;
|
|
|
|
|
var filePath = Path.Combine(_catalog, fileName);
|
|
|
|
|
if (File.Exists(filePath))
|
|
|
|
|
{
|
|
|
|
|
if (_options.Index.Enabled)
|
|
|
|
|
{
|
|
|
|
|
var offsets = Indexes.GetOffset(keys, true);
|
|
|
|
@ -287,11 +292,14 @@ namespace ZeroLevel.Services.PartitionStorage
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void RemoveKeyGroup(string fileName, TKey[] keys, bool inverseRemove, bool autoReindex)
|
|
|
|
|
{
|
|
|
|
|
TKey k;
|
|
|
|
|
var filePath = Path.Combine(_catalog, fileName);
|
|
|
|
|
if (File.Exists(filePath))
|
|
|
|
|
{
|
|
|
|
|
// 1. Find ranges
|
|
|
|
|
var ranges = new List<FilePositionRange>();
|
|
|
|
|
if (_options.Index.Enabled && autoReindex)
|
|
|
|
@ -425,6 +433,7 @@ namespace ZeroLevel.Services.PartitionStorage
|
|
|
|
|
RebuildFileIndex(filePath);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|