0
0
Redisquery~10 mins

Why transactions ensure atomicity in Redis - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start a Redis transaction.

Redis
redis_client.[1]()
Drag options to blanks, or click blank then click option'
AMULTI
BEXEC
CWATCH
DDISCARD
Attempts:
3 left
💡 Hint
Common Mistakes
Using EXEC to start a transaction instead of MULTI.
Using WATCH which is for monitoring keys, not starting transactions.
2fill in blank
medium

Complete the code to execute all commands in the Redis transaction atomically.

Redis
redis_client.[1]()
Drag options to blanks, or click blank then click option'
AMULTI
BWATCH
CEXEC
DDISCARD
Attempts:
3 left
💡 Hint
Common Mistakes
Using MULTI to execute commands instead of starting the transaction.
Using DISCARD which cancels the transaction.
3fill in blank
hard

Fix the error in the code to discard a Redis transaction.

Redis
redis_client.[1]()
Drag options to blanks, or click blank then click option'
AEXEC
BDISCARD
CMULTI
DWATCH
Attempts:
3 left
💡 Hint
Common Mistakes
Using EXEC which runs the transaction instead of discarding it.
Using MULTI which starts a transaction, not discards it.
4fill in blank
hard

Fill both blanks to watch a key and then start a transaction in Redis.

Redis
redis_client.[1]('mykey')
redis_client.[2]()
Drag options to blanks, or click blank then click option'
AWATCH
BMULTI
CEXEC
DDISCARD
Attempts:
3 left
💡 Hint
Common Mistakes
Using EXEC before MULTI.
Using DISCARD instead of MULTI to start the transaction.
5fill in blank
hard

Fill all three blanks to watch a key, start a transaction, and execute it in Redis.

Redis
redis_client.[1]('session')
redis_client.[2]()
redis_client.[3]()
Drag options to blanks, or click blank then click option'
AWATCH
BMULTI
CEXEC
DDISCARD
Attempts:
3 left
💡 Hint
Common Mistakes
Executing before starting the transaction.
Discarding instead of executing the transaction.