My playing about so far, with flow-of-thought-type questions

And some hints as to how to deal with the ‘harder’ problem would be appreciated :slight_smile:

I’ll reread it all shortly to make sure I have it all clear

Actually, foreachStreamMatching would be even more awesome for the above kinda things

Want to generate a projection containing hourly totals across a bunch of streams that have the same data in but otherwise unconnected (are partitioned on various different ways)? Not a problem - that pretty much takes care of the entire list of stats for the ‘easy’ stuff on my list above once I create the per-interest streams

i like the function alot as well been thinking about uaages for it

I’m gonna assume this is because I’ve just ran a fromAll().foreachStream() against my entire event db (yeah, I’m an idiot)

And this ended up meaning processing about 2.5 million events over an hour and boiling my MBA and goes beyond the expectations of what the ES should be doing on a crappy machine on mono, but here is a stack trace for you

Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS

Stacktrace:

at (wrapper managed-to-native) object.__icall_wrapper_mono_array_new_specific (intptr,int) <0xffffffff>

at System.Text.Encoding.GetChars (byte[],int,int) <0x0003b>

at System.Text.Encoding.GetString (byte[],int,int) <0x00023>

at System.Text.UTF8Encoding.GetString (byte[],int,int) <0x0001b>

at System.Text.Encoding.GetString (byte[]) <0x0002c>

at EventStore.Core.Services.Storage.StorageReaderWorker.m__36 (EventStore.Core.Data.EventRecord) <0x00027>

at System.Linq.Enumerable/c__Iterator27`2.MoveNext () <0x00114>

at System.Collections.Generic.List1.AddEnumerable (System.Collections.Generic.IEnumerable1) <0x0008a>

at System.Collections.Generic.List1..ctor (System.Collections.Generic.IEnumerable1) <0x0008b>

at System.Linq.Enumerable.ToArray (System.Collections.Generic.IEnumerable`1) <0x000df>

at EventStore.Core.Services.Storage.StorageReaderWorker.EventStore.Core.Bus.IHandle<EventStore.Core.Messages.ClientMessage.ListStreams>.Handle (EventStore.Core.Messages.ClientMessage/ListStreams) <0x00153>

at EventStore.Core.Bus.MessageHandler`1.TryHandle (EventStore.Core.Messaging.Message) <0x0008c>

at EventStore.Core.Bus.InMemoryBus.PublishByType (EventStore.Core.Messaging.Message,System.Type) <0x000ba>

at EventStore.Core.Bus.InMemoryBus.DispatchByType (EventStore.Core.Messaging.Message) <0x0002f>

at EventStore.Core.Bus.InMemoryBus.Publish (EventStore.Core.Messaging.Message) <0x00033>

at EventStore.Core.Bus.InMemoryBus.Handle (EventStore.Core.Messaging.Message) <0x00013>

at EventStore.Core.Bus.QueuedHandlerMRES.ReadFromQueue (object) <0x002a1>

at System.Threading.Thread.StartInternal () <0x000aa>

at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

mono() [0x4983b9]

/lib/x86_64-linux-gnu/libpthread.so.0(+0xf030) [0x7fe89060c030]

/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7fe8902a8475]

/lib/x86_64-linux-gnu/libc.so.6(abort+0x180) [0x7fe8902ab6f0]

mono() [0x5def59]

mono() [0x5d743a]

mono() [0x5d7646]

mono() [0x5d78aa]

mono() [0x5da582]

mono() [0x5da865]

mono() [0x5daa0b]

mono(mono_array_new_specific+0xa2) [0x568092]

[0x414a3ead]

Debug info from gdb:

What exact version of mono do you run? Do you start ES as mono or mono-sgen?

Ah good point, I was a lazy bastard and didn’t do it with sgen - that would explain heap allocation issues :slight_smile: