Skip to content

Commit 76fc9c7

Browse files
committed
swallow commit errors for now.
1 parent 66f55df commit 76fc9c7

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/DotJEM.Json.Index2.Management/IJsonIndexManager.cs

+1
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ public Task UpdateGenerationAsync(string area, long generation)
109109

110110
public async Task ResetIndexAsync()
111111
{
112+
112113
index.Storage.Delete();
113114
await jsonDocumentSource.ResetAsync().ConfigureAwait(false);
114115
}

src/DotJEM.Json.Index2.Management/Writer/IJsonIndexWriter.cs

+14-2
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,30 @@ private void Tick()
108108
long time = Stopwatch.GetTimestamp();
109109
if (time - lastInvocation > upperBound)
110110
{
111-
target.Writer.Commit();
111+
Commit();
112112
lastInvocation = time;
113113
return;
114114
}
115115

116116
if (time - lastRequest > lowerBound)
117117
{
118-
target.Writer.Commit();
118+
Commit();
119119
lastInvocation = time;
120120
}
121121
}
122122

123+
private void Commit()
124+
{
125+
try
126+
{
127+
target.Writer.Commit();
128+
}
129+
catch (Exception e)
130+
{
131+
// SWALLOW FOR NOW
132+
}
133+
}
134+
123135
public void Invoke()
124136
{
125137
lastRequest = Stopwatch.GetTimestamp();

0 commit comments

Comments
 (0)