Skip to content

runNoReply in java does not work due to toCompletableFuture #5938

@maarest

Description

@maarest

Hi,

I don't have a fix for the issue. If you try out this code, you'll see that it will hang:

   Connection conn = r.connection().hostname("localhost").port(28015).db("test").connect();
    System.out.println("Connected!");

    r.table("authors").insert(r.hashMap("name", "William Adama")
                    .with("tv_show", "Battlestar Galactica")
                    .with("posts", r.array(
                            r.hashMap("title", "Decommissioning speech")
                                    .with("content", "The Cylon War is long over..."),
                            r.hashMap("title", "We are at war")
                                    .with("content", "Moments ago, this ship received..."),
                            r.hashMap("title", "The new Earth")
                                    .with("content", "The discoveries of the past few days...")
                            )
                    )).run(conn);

    System.out.println("Inserted in Run!");
    r.table("authors").insert(
            r.hashMap("name", "William Adama")
                    .with("tv_show", "Battlestar Galactica")
                    .with("posts", r.array(
                            r.hashMap("title", "Decommissioning speech")
                                    .with("content", "The Cylon War is long over..."),
                            r.hashMap("title", "We are at war")
                                    .with("content", "Moments ago, this ship received..."),
                            r.hashMap("title", "The new Earth")
                                    .with("content", "The discoveries of the past few days...")
                            )
                    )).runNoReply(conn);
    System.out.println("Inserted in RunNoReply!");

This is apparently due to this line:
https://github.com/rethinkdb/rethinkdb/blob/next/drivers/java/src/main/java/com/rethinkdb/net/Connection.java#L211
toCompletableFuture that never completes in the future

This is I would say something quite important as we really need to have the massive performance improvement brought by runNoReply

Regards,
Stephane

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions