Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis Store Migration from 2.0.0-M10 to 2.0.0-M11 #1418

Open
sbernard31 opened this issue Mar 10, 2023 · 2 comments
Open

Redis Store Migration from 2.0.0-M10 to 2.0.0-M11 #1418

sbernard31 opened this issue Mar 10, 2023 · 2 comments
Labels
announce Announce (E.g new release)

Comments

@sbernard31
Copy link
Contributor

sbernard31 commented Mar 10, 2023

Changes :

Between 2.0.0-M10 and 2.0.0-M11, there is lot of changes in Redis Store I tried to list it just below 👇 :

Store old key/prefix new key/prefix Data compatibility break PR
RedisSecurityStore SEC#EP# SECSTORE#SEC#EP# compatible #1398
PSKID#SEC SECSTORE#EP#PSKID compatible #1398
RedisRegistrationStore REG:EP: REGSTORE#REG#EP# not compatible #1414 #1318
EP:REGID: REGSTORE#EP#REGID# compatible #1414
EP:ADDR: REGSTORE#EP#ADDR# compatible #1414
EP:IDENTITY: REGSTORE#EP#IDENTITY# compatible #1414
LOCK:EP: REGSTORE#LOCK#EP# compatible #1414
OBS:TKN: REGSTORE#OBS#TKN# not compatible #1414 #1318
TKNS:REGID: REGSTORE#TKNS#REGID# compatible #1414
EXP:EP REGSTORE#EXP#EP compatible #1414

Recommended Migration Way :

For RedisSecurityStore :

  1. use old keys : new RedisSecurityStore.Builder(jedis).setPrefix(null).setEndpointByPskIdKey("PSKID#SEC").build();
  2. OR write a migration script which renames keys (let us know if you write something like this)

For RedisRegistrationStore, as registration is just kind of "session", probably better to just drop all data and so force client to re-register.
Note that key name changed, so if you do nothing, registration will not be found and so client will re-register but old data will not be deleted.
Looking at #1401 (comment) could help.

Will it change again soon ?

We will not change this just for fun, but at the same time there are already some identified point which could lead to new changes:

ℹ️ So, IF you don't specially need M11 new feature AND you are using Redis Store AND you can not migrate easily THEN maybe better to wait for a next releases. ℹ️

@sbernard31 sbernard31 added the announce Announce (E.g new release) label Mar 10, 2023
@sbernard31
Copy link
Contributor Author

sbernard31 commented Jul 24, 2023

From 2.0.0-M11 to 2.0.0-M12

We break again RedisRegistrationStore data format with #1436.
For Key REGSTORE#REG#EP#, Registration identity field was replaced by transportdata field which a completely different way to serialize.
For Key REGSTORE#EP#IDENTITY#, Identity has completely different way to be serialized.

For RedisRegistrationStore, as registration is just kind of "session", easy way to migrate could be to just drop all data and so force client to re-register.

@sbernard31
Copy link
Contributor Author

From 2.0.0-M16 to 2.0.0-M17

We break again RedisRegistrationStore data format with #1656.

  • REGSTORE#OBS#TKN# prefix is now named REGSTORE#OBS#OBSID#. The key using this prefix is no more followed by the observation Token (as byte array) but by observation identifier (as byte array like "endpointUri##token").
  • REGSTORE#TKNS#REGID# prefix is now named REGSTORE#OBSIDS#REGID#. The value indexed by this key no more contains a list of token but a list of observation identifier (as byte array like "endpointUri##token").

For RedisRegistrationStore, as registration is just kind of "session", easy way to migrate could be to just drop all data and so force client to re-register.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
announce Announce (E.g new release)
Projects
None yet
Development

No branches or pull requests

1 participant