These are chat archives for atomix/atomix

6th
Jun 2016
Tom
@taobaorun
Jun 06 2016 09:05
offset index is in memory?
Jordan Halterman
@kuujo
Jun 06 2016 09:22
Yep... There some work that needs to be done there. The fact is, older logs are rarely accessed, so really only recent segments need an in-memory index and older segments can be fully written to disk or the index can be rebuilt when necessary (e.g. a new mode joins the cluster) but for now yes they're in memory. The OffsetIndex requires Only 4 bytes per entry for uncompacted segments and 12 bytes for compacted segments. Obviously the benefit is compacted segments usually have far fewer entries than uncompacted segments.
Indexes are in memory for performance obviously, and I've never seen any memory issues as a result of that optimization
Tom
@taobaorun
Jun 06 2016 09:54
@kuujo thanks,i understand.
David Moravek
@dmvk
Jun 06 2016 12:56
hi, i've created my own own ResourceStateMachine and I need to publish events from it. Anyway I gather sessions via SessionListener::register method, so I end up with cannot be cast to io.atomix.manager.resource.internal.InstanceEvent exception, because this ServerSessions is not wrapped ManagedResourceSession :( Am I missing something? I dont want to send extra "subscribe" in order to gather sessions. Thanks
IMO the problem is in InstanceClient implementation
Jordan Halterman
@kuujo
Jun 06 2016 15:57
Hmm
Jordan Halterman
@kuujo
Jun 06 2016 16:54
@davidmoravek not sure I'm following. Atomix uses sessions in state machines all throughout the project, so there must be something different going on. This slunds more like a bug in ServerStateMachine. Are you using the Sessions field of the state machine? If you are then I think there's a bug in ResourceStateMachine which is an easy fix that I'll push today. All the Atomix resources just get the ServerSessions as they're registered. If it's something else can you post a code example of how the state machine is accessing them?
sounds*