Hello Sabya,
> My use case is that , i can't keep parent and child both in same slot.
I'm curious, how can you be sure these slots are on the same Redis node?
Are you using Cluster with only one shard?
Viktor
On 2023-06-12 08:38, Sabyasachi Sahoo wrote:
> ERR Unexpected flag in script shebang: allow_cross_slot_keys
> when I am trying to load the script that I have pasted via redis-cli ,
> it is throwing this - *ERR Unexpected flag in script shebang:
> allow_cross_slot_keys *, when i 'm trying to load it via java code and
> use it , then i am getting cross slot error.
>
> My use case is that , i can't keep parent and child both in same slot.
>
> Please help. Provide some examples
>
> Thanks and Regards,
> Sabya
>
> On Saturday, June 10, 2023 at 10:11:01 PM UTC+5:30
madely...@gmail.com
> wrote:
>
> Using scripts that cross slots is considered an anti-pattern in
> Redis. The flag you mentioned is mostly intended for compatibility
> with older scripts which might have been previously accessing cross
> slots, see
>
https://redis.io/docs/manual/programmability/lua-api/#script_flags
> <
https://redis.io/docs/manual/programmability/lua-api/#script_flags>. You should investigate if you can modify your script to use hash tags to follow best practices.
>
> -Madelyn
> On Jun 8, 2023 at 8:50 PM -0700, Sotto Voce <
speakso...@gmail.com>,
> wrote:
>> You mention "script" and "function", but it's not clear whether
>> you're talking about LUA scripts/functions invoked by the
>> EVAL/FCALL commands, or you're talking about ordinary key read and
>> write commands. Are you working with LUA scripts or functions?
>>
>> On Thursday, June 8, 2023 at 6:00:34 AM UTC-7 Sabyasachi Sahoo wrote:
>>
>> Hello,
>> I want to perform some cross slot operations.
>> When I explored, I found that a flag(allow-cross-slot-keys)
>> was added in this PR -
>>
https://github.com/redis/redis-doc/pull/1893/files
>> <
https://github.com/redis/redis-doc/pull/1893/files>.
>> I tried to apply this flag in script as well as function but
>> no luck.
>> I am trying to do this via java app.
>> redis version - 7.0.11
>> client library - lettuce.
>>
>> I'm stuck for quite sometime now
>> Please help, thanks in advance.
>>
>> Thanks and Regards,
>> Sabya
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Redis DB" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to
redis-db+u...@googlegroups.com.
>> To view this discussion on the web visit
>>
https://groups.google.com/d/msgid/redis-db/dc61a882-7a21-4ab9-978b-8638bda1d531n%40googlegroups.com <
https://groups.google.com/d/msgid/redis-db/dc61a882-7a21-4ab9-978b-8638bda1d531n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
redis-db+u...@googlegroups.com
> <mailto:
redis-db+u...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/redis-db/8cf3cdd4-508a-4d93-bbb9-47a3317ae613n%40googlegroups.com <
https://groups.google.com/d/msgid/redis-db/8cf3cdd4-508a-4d93-bbb9-47a3317ae613n%40googlegroups.com?utm_medium=email&utm_source=footer>.