Closed matiasgarciaisaia closed 1 year ago
Why might be able to marshal the Erlang terms into binary using term_to_binary/1
when saving and binary_to_term/1
when loading.
I just tried and the error changed to invalid string value
because I tried to store binary data into a TEXT column. I'll try again with a BLOB column, but I'm confident it would work.
In #916 we introduced a bug that keeps calls as
active
after they finish (similar to #900, but with a different cause).The reason is that the broker now includes a
CallLog
'sjs_context
in the fields that it tries to persist to the database, but thejs_context
includes Erlang functions and other non-serializable things - making the broker crash when trying to save a finishedCallLog
.Sample with extra log info to see what's trying to get updated in the DB
We should update the code so that we only persist the session variables, and re-hydrate the whole context from that when reading the call log again.