0

I'm designing a data pipeline where I need to run several python scripts in parallel updating Redis hashes and ttl, they will update same hashes but different keys. Although each will update hash TTL also.

Would I face the shared resource issue?

I checked the documents and I could not find if hset function or expire function is atomic.

talkhouon
  • 21
  • 5
  • Do you concern about the first expire command or the last one ? You may choose another strategy such as a single hash with all the fields + expire values are updated by a single process and covered by multi/exec(if necessary) – Ersoy Apr 24 '20 at 00:57
  • I experimented two scripts were updating a same hash in Redis, and I did not get any error, I wanna understand the side effects, that what can happen at worst? regarding your question, both expires from any script has the same priority, so I just want whatever comes last, to be the effective one just I'm wondering in those microseconds that one script is updating ttl on the hash, if the other one wants to update, what is gonna happen? is there a problem? or the hash is kind of locked, and the other script can update ttl just after the previous one.. – talkhouon Apr 24 '20 at 20:20

0 Answers0