Skip to content

[BUG] SQL Join timeout isn't applied when using PIT #3820

@Swiddis

Description

@Swiddis

What is the bug?
When using a JOIN timeout hint with a PIT-enabled cluster, the PIT will get deleted before the timeout expires.

Caused by: java.lang.IllegalArgumentException: Point In Time id: [y_T7MwDnSG-rblpw9Xa6mQ] doesn't exist

This is due to a 1-minute keepalive

Used by PIT at

LocalClusterState.state().getSettingValue(SQL_CURSOR_KEEP_ALIVE), false, indices);

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Create indices that require more than 60s to join on (>5 mil records each)
  2. Configure the cluster to use PIT joins per
    "plugins.sql.pagination.api" : "true"
  3. Run a join query with a longer join timeout hint /*! JOIN_TIME_OUT(90) */
  4. See in the logs that the join failed because the PIT no longer exists (deleted by the 1m keepalive)

What is the expected behavior?
The JOIN_TIME_OUT should also update the keepalive

What is your host/environment?

  • OS: Latest

Do you have any screenshots?
N/A

Do you have any additional context?
Add any other context about the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SQLbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions