We are using redisson's distributed locks in order to avoid concurrency issue in our distributed environment but while acquiring the lock I also want to save some meta data like userId (random UUID) to know who acquired the lock, but the contingency is that I can't make the userId part of the key.
So please help me out if we can store some custom metadata with lock-key in redis distributed locks, or if there's any work around to get similar result.
RLock lock = redisson.getFairLock("anyLock");//if we can store some custom data with the lock key.lock.lock();try { ...} catch { lock.unlock();}