Aleksey Kondratenko (Inactive)
added a comment - 02/May/12 1:39 PM thanks for raising this again.
Looks like our workaround is not working all the time. For now manual workaround of deleting mnesia files and starting ns_server again will work.
For future we'll get rid of mnesia completely.

Dipti, maybe I'm missing something and stats-in-mnesia is not "unfixable crap". But my plan since before 1.7.0 was to replace saving stats in mnesia with much simpler periodic snapshotting into plain file. Because stats are not really precious thing.

I estimate this work to be around 1-2 days including thorough testing.

We also had some plans for storing stats in couch, but given KISS principle I think my simplified approach is what we need.

Aleksey Kondratenko (Inactive)
added a comment - 02/May/12 1:56 PM Dipti, maybe I'm missing something and stats-in-mnesia is not "unfixable crap". But my plan since before 1.7.0 was to replace saving stats in mnesia with much simpler periodic snapshotting into plain file. Because stats are not really precious thing.
I estimate this work to be around 1-2 days including thorough testing.
We also had some plans for storing stats in couch, but given KISS principle I think my simplified approach is what we need.
Please, decide when we want this work to be done.

Mnesia does it's own journalling and crash recovery and durable commits and stuff like that. Or supposedly does.

My point was we don't need that level of durability. That means that instead of trying to commit supposedly durable transaction via mnesia after each stats sample we'll accumulate changes and save them once or twice per minute. Saving itself (because it's not much data) can be made durable and cheap.

Aleksey Kondratenko (Inactive)
added a comment - 02/May/12 5:33 PM Let me explain "not really precious thing" better. Apparently it's too easily to misunderstand my original phrase as "we shouldn't save stats at all".
Mnesia does it's own journalling and crash recovery and durable commits and stuff like that. Or supposedly does.
My point was we don't need that level of durability. That means that instead of trying to commit supposedly durable transaction via mnesia after each stats sample we'll accumulate changes and save them once or twice per minute. Saving itself (because it's not much data) can be made durable and cheap.

The code was actually ready for 2.0.1 but sadly too late. So 2.0.2 got it early.

Impact on upgrade process is simple. People will lose their stats archive. I.e. we don't bother converting stats from mnesia to new format. But note that rolling upgrade already causes them to lose historical stats.

Aleksey Kondratenko (Inactive)
added a comment - 09/Apr/13 12:54 PM The code was actually ready for 2.0.1 but sadly too late. So 2.0.2 got it early.
Impact on upgrade process is simple. People will lose their stats archive. I.e. we don't bother converting stats from mnesia to new format. But note that rolling upgrade already causes them to lose historical stats.