Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting RuntimeException "java.lang.RuntimeException: Multi is a Map" while HGETALL with redis-server version 6.2.5. #4481

Closed
navi2589 opened this issue Sep 13, 2022 · 4 comments
Labels

Comments

@navi2589
Copy link

navi2589 commented Sep 13, 2022

Getting RuntimeException "java.lang.RuntimeException: Multi is a Map" while HGETALL with redis-server version 6.2.5.

Same is code is working with redis-server version "3.2.6".

4.3.2

Which version(s) did you encounter this bug ?

`

<dependency>
  <groupId>io.vertx</groupId>
  <artifactId>vertx-core</artifactId>
  <version>4.3.2</version>
</dependency>

<dependency>
  <groupId>io.vertx</groupId>
  <artifactId>vertx-redis-client</artifactId>
  <version>4.3.2</version>
</dependency>

`

Context

Getting RuntimeException "java.lang.RuntimeException: Multi is a Map" while HGETALL with redis-server version 6.2.5.
Same is code is working with redis-server version "3.2.6".

java.lang.RuntimeException: Multi is a Map at io.vertx.redis.client.impl.types.MultiType.get(MultiType.java:114) at com.example.starter.MainVerticle.lambda$start$0(MainVerticle.java:25) at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141) at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) at io.vertx.core.impl.future.Composition$1.onSuccess(Composition.java:62) at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) at io.vertx.core.impl.future.Eventually$1.onSuccess(Eventually.java:44) at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) at io.vertx.core.impl.future.SucceededFuture.addListener(SucceededFuture.java:88) at io.vertx.core.impl.future.Eventually.onSuccess(Eventually.java:41) at io.vertx.core.impl.future.FutureBase.emitSuccess(FutureBase.java:60) at io.vertx.core.impl.future.FutureImpl.tryComplete(FutureImpl.java:211) at io.vertx.core.impl.future.PromiseImpl.tryComplete(PromiseImpl.java:23) at io.vertx.redis.client.impl.RedisStandaloneConnection.handle(RedisStandaloneConnection.java:409) at io.vertx.redis.client.impl.RESPParser.handleResponse(RESPParser.java:296) at io.vertx.redis.client.impl.RESPParser.handle(RESPParser.java:128) at io.vertx.redis.client.impl.RESPParser.handle(RESPParser.java:24) at io.vertx.core.net.impl.NetSocketImpl.lambda$new$1(NetSocketImpl.java:98) at io.vertx.core.streams.impl.InboundBuffer.handleEvent(InboundBuffer.java:239) at io.vertx.core.streams.impl.InboundBuffer.write(InboundBuffer.java:129) at io.vertx.core.net.impl.NetSocketImpl$DataMessageHandler.handle(NetSocketImpl.java:418) at io.vertx.core.impl.EventLoopContext.emit(EventLoopContext.java:55) at io.vertx.core.impl.ContextBase.emit(ContextBase.java:239) at io.vertx.core.net.impl.NetSocketImpl.handleMessage(NetSocketImpl.java:394) at io.vertx.core.net.impl.ConnectionBase.read(ConnectionBase.java:155) at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:153) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:722) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:833)

Do you have a reproducer?

package com.example.starter;

import io.vertx.core.*;
import io.vertx.redis.client.Redis;
import io.vertx.redis.client.Request;
import io.vertx.redis.client.Response;


import static io.vertx.redis.client.Command.HGETALL;

public class MainVerticle extends AbstractVerticle {

  @Override
  public void start(Promise<Void> startPromise) throws Exception {

    io.vertx.redis.client.RedisOptions publisherRedisConfig = new io.vertx.redis.client.RedisOptions();
    String connectionString = "redis://localhost:6379";
    publisherRedisConfig.setConnectionString(connectionString);
    Redis publisherRedis = Redis.createClient(Vertx.currentContext().owner(), publisherRedisConfig);
    final Request req = Request.cmd(HGETALL);
    req.arg("PROD-SUPPORT.Interface.PROVIDERS_7773");
    publisherRedis.send(req, handler->{
      if(handler.succeeded()){
         Response response = handler.result();
        Object getResult = response.get(1);
        System.out.println(getResult.toString());
      }
    });

  }

}

Steps to reproduce

  1. Add hash in redis having redis-server version 6.2.5.
  2. try to access this hash with hgetall with the above reproducer
  3. You will get the exception java.lang.RuntimeException: Multi is a Map
  4. downgrade redis-server version to 3.2.6 then you will not get exception.

Extra

  • Anything that can be relevant such as OS version, JVM version
  • Java version amazon corretto 17 (Issue is not specific to java version)
  • Mac os monterey 12.5.1
@navi2589 navi2589 added the bug label Sep 13, 2022
@navi2589
Copy link
Author

@vietj @pmlopes Can you please take a look

@vietj
Copy link
Member

vietj commented Sep 14, 2022

assigned to you @pmlopes

@vietj vietj added this to the 4.3.4 milestone Sep 14, 2022
@vietj
Copy link
Member

vietj commented Sep 14, 2022

can you recreate this issue in this repository https://github.com/vert-x3/vertx-redis-client thanks

@vietj vietj closed this as not planned Won't fix, can't repro, duplicate, stale Sep 14, 2022
@vietj vietj removed this from the 4.3.4 milestone Sep 14, 2022
@vietj vietj added invalid and removed bug labels Sep 14, 2022
@navi2589
Copy link
Author

@vietj @pmlopes Created issue under vertx-redis-client project
vert-x3/vertx-redis-client#347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants