1 based arrays, so good

This commit is contained in:
Kevin Darby committed 2019-12-12 18:26:10 -05:00
1 parent 3ba17f1c87
commit 4f59c1bb47
2 files changed
+3 -30

No files matched your search

@@ -269,8 +269,7 @@ namespace bts.history
if (order.ReferenceId == 0)
continue;
// entries is indexed by 0 but ref is indexed by 1 :facepalm:
int mdidx = ((int)order.ReferenceId) - 1;
Log.assert(mdidx == entry_index);
Log.assert(order.ReferenceId == entry_index);
cache.Add( make_mbo(entry, order) );
}
@@ -234,37 +234,11 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"metadata": {
"scrolled": true
},
"outputs": [
{
"ename": "Unhandled Exception",
"evalue": "Command aggregate failed: Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in..",
"output_type": "error",
"traceback": [
"Unhandled Exception",
"Command aggregate failed: Sort exceeded memory limit of 104857600 bytes, but did not opt in to external sorting. Aborting operation. Pass allowDiskUse:true to opt in..",
" at MongoDB.Driver.Linq.MongoQueryProviderImpl`1.Execute(Expression expression)",
" at MongoDB.Driver.Linq.MongoQueryableImpl`2.GetEnumerator()",
" at bts.history.Query.stream_data[T,U](IEnumerable`1[] datastream, Func`3 function)+MoveNext() in c:\\code\\bts\\spark\\src\\client\\spark_historical\\Query\\Query.cs:line 70",
" at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()",
" at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()",
" at System.Linq.Enumerable.EnumerablePartition`1.MoveNext()",
" at Microsoft.DotNet.Interactive.Rendering.HtmlFormatter`1.<>c__DisplayClass7_0.<CreateForSequence>b__4(T instance, TextWriter writer)",
" at Microsoft.DotNet.Interactive.Rendering.HtmlFormatter`1.Format(T instance, TextWriter writer)",
" at Microsoft.DotNet.Interactive.Rendering.TypeFormatter`1.Microsoft.DotNet.Interactive.Rendering.ITypeFormatter.Format(Object instance, TextWriter writer)",
" at Microsoft.DotNet.Interactive.Rendering.Formatter`1.FormatTo(T obj, TextWriter writer, String mimeType)",
" at Microsoft.DotNet.Interactive.Rendering.Formatter.FormatTo[T](T obj, TextWriter writer, String mimeType)",
" at Microsoft.DotNet.Interactive.Rendering.Formatter.ToDisplayString(Object obj, String mimeType)",
" at Microsoft.DotNet.Interactive.Kernel.display(Object value, String mimeType)",
" at Submission#10.<<Initialize>>d__0.MoveNext()",
"--- End of stack trace from previous location where exception was thrown ---",
" at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)"
]
}
],
"outputs": [],
"source": [
"var fill_model = new FIFOModel(new Bucket(20_000, 20_001));\n",
"var stream = run_algo<HistoryRow,AlgoReport>(algo_type, fill_model, algo_params,\n",