Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
vplauzon committed Aug 13, 2024
1 parent f520b51 commit 7ad41ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions code/KustoCopyConsole/Entity/InMemory/RowItemInMemoryCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ internal class RowItemInMemoryCache
private volatile IImmutableDictionary<(Uri, string), SourceDatabaseCache> _sourceDatabaseMap
= ImmutableDictionary<(Uri, string), SourceDatabaseCache>.Empty;

public event EventHandler<RowItem>? NewRowItem;

public RowItemInMemoryCache(IEnumerable<RowItem> items)
{
lock (_lock)
Expand Down Expand Up @@ -45,10 +43,6 @@ public void AddItem(RowItem item)
AddItemToCache(item));
}
}
if (NewRowItem != null)
{
NewRowItem(this, item);
}
}

private IImmutableDictionary<(Uri, string), SourceDatabaseCache> AddItemToCache(RowItem item)
Expand Down
6 changes: 6 additions & 0 deletions code/KustoCopyConsole/Storage/RowItemGateway.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ private record QueueItem(byte[] Buffer, TaskCompletionSource TaskSource);
private readonly AsyncLock _asyncLock = new();
private TaskCompletionSource _persistanceTaskSource = new();

public event EventHandler<RowItemAppend>? RowItemAppended;

#region Construction
private RowItemGateway(IAppendStorage appendStorage, RowItemInMemoryCache cache)
{
Expand Down Expand Up @@ -148,6 +150,10 @@ public async Task<RowItemAppend> AppendAsync(RowItem item, CancellationToken ct)
{
QueueCurrentStream();
}
if (RowItemAppended != null)
{
RowItemAppended(this, package);
}

return package;
}
Expand Down

0 comments on commit 7ad41ca

Please sign in to comment.