Commit 18e52d2c17d26e008dd5557ad9531752556002f5
Merge branch 'feature/ota-package' of https://github.com/YevhenBondarenko/things…
…board into YevhenBondarenko-feature/ota-package
Showing
2 changed files
with
5 additions
and
5 deletions
... | ... | @@ -247,7 +247,6 @@ public class DefaultLwM2MTransportMsgHandler implements LwM2mTransportMsgHandler |
247 | 247 | * @param observations - !!! Warn: if have not finishing unReg, then this operation will be finished on next Client`s connect |
248 | 248 | */ |
249 | 249 | public void unReg(Registration registration, Collection<Observation> observations) { |
250 | - log.error("Client unRegistration -> test", new RuntimeException()); | |
251 | 250 | unRegistrationExecutor.submit(() -> { |
252 | 251 | try { |
253 | 252 | this.sendLogsToThingsboard(LOG_LW2M_INFO + ": Client unRegistration", registration.getId()); | ... | ... |
... | ... | @@ -337,23 +337,24 @@ public class TbLwM2mRedisRegistrationStore implements CaliforniumRegistrationSto |
337 | 337 | } |
338 | 338 | } |
339 | 339 | |
340 | + //TODO: JedisCluster didn't implement Transaction, maybe should use some advanced key creation strategies | |
340 | 341 | private void removeAddrIndex(RedisConnection connection, Registration registration) { |
341 | 342 | // Watch the key to remove. |
342 | 343 | byte[] regAddrKey = toRegAddrKey(registration.getSocketAddress()); |
343 | - connection.watch(regAddrKey); | |
344 | +// connection.watch(regAddrKey); | |
344 | 345 | |
345 | 346 | byte[] epFromAddr = connection.get(regAddrKey); |
346 | 347 | // Delete the key if needed. |
347 | 348 | if (Arrays.equals(epFromAddr, registration.getEndpoint().getBytes(UTF_8))) { |
348 | 349 | // Try to delete the key |
349 | - connection.multi(); | |
350 | +// connection.multi(); | |
350 | 351 | connection.del(regAddrKey); |
351 | - connection.exec(); | |
352 | +// connection.exec(); | |
352 | 353 | // if transaction failed this is not an issue as the socket address is probably reused and we don't neeed to |
353 | 354 | // delete it anymore. |
354 | 355 | } else { |
355 | 356 | // the key must not be deleted. |
356 | - connection.unwatch(); | |
357 | +// connection.unwatch(); | |
357 | 358 | } |
358 | 359 | } |
359 | 360 | ... | ... |