diff --git a/src/client/spark_historical/FillModel/MBOBook.cs b/src/client/spark_historical/FillModel/MBOBook.cs index adf5ed312..8e795671a 100644 --- a/src/client/spark_historical/FillModel/MBOBook.cs +++ b/src/client/spark_historical/FillModel/MBOBook.cs @@ -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) ); } diff --git a/src/client/spark_historical/Notebooks/roll.ipynb b/src/client/spark_historical/Notebooks/roll.ipynb index e54b5d4a2..b73e337aa 100644 --- a/src/client/spark_historical/Notebooks/roll.ipynb +++ b/src/client/spark_historical/Notebooks/roll.ipynb @@ -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.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.<>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(algo_type, fill_model, algo_params,\n",