Skip to content

Extend EXECABORT with "previous errors" #4084

Closed
@nerg4l

Description

@nerg4l

In a MULTI/EXEC environment, Jedis might receive the following response when an issue is detected:

JedisDataException: EXECABORT Transaction discarded because of previous errors.

In such cases, no information is included in the exception and because of the exception, the redis.clients.jedis.Response value is never set and throws an exception when the user tries to read it.

IllegalStateException: Please close pipeline or multi block before calling this method.

Which is a bit misleading because the multi block was closed.

InpuStream example:

+OK
+QUEUED
-CROSSSLOT Keys in request don't hash to the same slot (context='within MULTI', command='get', original-slot='9842', wrong-slot='5649', first-key='1', violating-key='2')
-CROSSSLOT Keys in request don't hash to the same slot (context='within MULTI', command='get', original-slot='9842', wrong-slot='1584', first-key='1', violating-key='3')

Is it possible to include these in the exception or to populate the Response objects and let the user find the relevant errors?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions