DEL MyType just stopped working..

5 views
Skip to first unread message

Adam Lev-Libfeld

unread,
Dec 4, 2016, 4:10:33 PM12/4/16
to redis-mo...@googlegroups.com
I'm not sure when did this start (5 days ago, the last build worked fine), but now running 
`DEL MyType` is failing, even if the deletion function for that type is empty. 

Any advice about how to approach this?

Adam Lev-Libfeld

unread,
Dec 4, 2016, 4:23:45 PM12/4/16
to redis-mo...@googlegroups.com

Itamar Haber

unread,
Dec 4, 2016, 4:31:41 PM12/4/16
to Adam Lev-Libfeld, redis-module-devs
My guess:
1) You pulled a new Redis version from unstable or the v4.0RC1, and
2) You didn't refresh the redismodule.h file in your project and/or recompile it, and
3) You didn't notice the **BREAKING API CHANGE** in registering new data types via a struct intializer

--
You received this message because you are subscribed to the Google Groups "redis-module-devs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-module-devs+unsubscribe@googlegroups.com.
To post to this group, send email to redis-module-devs@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/redis-module-devs/CAJ7N2ZDAWvXqAPidyFRm9QMi1V-6WzjXc2fU-WJ386qjz%2BKCPQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--

Itamar Haber | Chief Developer Advocate
Redis Labs ~/redis

Mobile: +972 (54) 567 9692
Email: ita...@redislabs.com
Twitter: @itamarhaber
Skype: itamar.haber

Blog  |  Twitter  |  LinkedIn


Adam Lev-Libfeld

unread,
Dec 4, 2016, 6:12:00 PM12/4/16
to Itamar Haber, redis-module-devs
Right on the money. 
Does that mean that now that I have fixed the module it's no longer compatible with 4.0?
Sorry for the n00b question,  couldn't find the release notes you've mentioned. 

Cheers, 
Adam 

Itamar Haber

unread,
Dec 4, 2016, 6:54:02 PM12/4/16
to Adam Lev-Libfeld, redis-module-devs
Actually, it's not mentioned in the release notes so technically you didn't miss it :) The reason for that absence, I assume, is that this is the first official release from the unstable modules tip so in a sense there was no previous (official) API to break. That said, it is an important note.

The new API is documented in the TYPE.md and API.md files, and it was practically the last thing that made it into the RC (https://github.com/antirez/redis/commit/71e8d15e493217df16e82a81fa2c587b64a74ef9). This method for registering types was proposed in the past as means to simplify the registration process as well as to provide for future comparability (now we can change the registration while being compatible with future-older modules). At the last minute it was felt that it is better to implement this change before release the official release candidate, at the price of breaking the module developed against unstable.

The change's impact it that the old (unstable) API for data type registration is obsoleted and should be replaced with that of v4 in your module. If you're still using the old API you'll get borked - as you've found out. Luckily, the change is purely technical and easy to affect - see https://github.com/TamarLabs/ReDe/pull/17 ;)

Reply all
Reply to author
Forward
0 new messages