varex=newRedisCommandException($"This operation would involve too many arguments ({required} vs the redis limit of {PhysicalConnection.REDIS_MAX_ARGS}): {s}");
@@ -474,8 +474,14 @@ internal void WriteHeader(RedisCommand command, int arguments)
WriteRaw(outStream,arguments+1);
WriteUnified(outStream,commandBytes);
}
internalconstintREDIS_MAX_ARGS=1024*1024;// there is a <= 1024*1024 max constraint inside redis itself: https://github.com/antirez/redis/blob/6c60526db91e23fb2d666fc52facc9a11780a2a3/src/networking.c#L1024
if(arguments>=REDIS_MAX_ARGS)// using >= here because we will be adding 1 for the command itself (which is an arg for the purposes of the multi-bulk protocol)