[cachebox] Serialization issue with Couchbase Provider

Wanted to report this for anyone else that is using (or thinking of using) the couchbase provider for cachebox. We’ve gotten a ton of benefit from it for our client, particularly since any restart of the CF server (or the entire box) which normally wiped out cache would cause a ton of issues when the database had to repopulate cache from scratch. With couchbase, you can even restart the couchbase server itself and not lose cache, while it’s combination of in-memory and disk cache provides a really great level of performance along with failover. I’d highly recommend looking into it, if you haven’t already!

However, recently we started getting odd errors for our cached items on development and staging, while testing both the latest CF10 updates as well as a potention CF11 upgrade. We finally were able to track the problem down to a change in serialization in CF10 update 14. This unfortunately causes problems in some cases with the base64 serialization that the couchbase provider uses to store complex objects. It’s been reported by users in a variety of other situations as well but Adobe has yet to fix it, claiming that the change is “per spec”. A frustrating excuse to something as obvious an issue as that deserializing something that you serialized results in a CF error being thrown!

Would appreciate any votes you want to throw on these bug reports, but want to make sure if you are using the couchbase provider, don’t upgrade past update 13 for the time being, unless you plan to add a workaround for this! Typically just modifying the data in some way, in our case we are thinking of doing a try/catch for the recordset we get from a storedproc and if it fails to deserialize, we’ll have to wrap it in a query-of-query which adds additional metadata, and thus does not have the same serialization problem.

https://bugbase.adobe.com/index.cfm?event=bug&id=3837347

Mary Jo Sminkey

Thanks for the legwork Mary Jo. If you flush the bucket and repopulate the data fresh, does it work or is it simply broken period after update 14?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

No, unfortunately if the data stays the same, it will fail the deserialization step every time. The only way around it is to not cache that item at all, or change it in some way. We don’t hit it that often, but enough on dev that we would probably be having major issues were we to update our production server without a workaround in place.

Mary Jo