Skip to content

Conversation

@markoszah
Copy link
Member

Simplified VirtualScan info and introduced new PrepareQueryException

@markoszah markoszah requested a review from jinzha October 29, 2024 17:35
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 29, 2024
/* added in V4 */
public static final int TABLE_NOT_READY = 26;
public static final int UNSUPPORTED_QUERY_VERSION = 27;
/* added in V5 */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we don't have serial version V5, the current version is V4 that is for NSON protocol I think. So maybe no need this comment?

* The query must be recompiled after DDL changes on the tables and/or
* indexes that are accessed by the query.
*/
public class PrepareQueryException extends NoSQLException {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new PrepareQueryException is public, maybe add a change log entry for it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the driver with simplified VirtualScan working with the older version proxy which expects the full table resume info in VirtualScan(e.g. the released proxy in KV 24.4)?

On the other hand, the driver 5.4.16 or older version which provides full table resume info in VirtualScan seems work with the newer proxy which expects simplified VirtualScan, fields other than the sid and pid will be ignored, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just pushed a fix to the problem of new driver, old proxy. The new driver uses a new query version (V5). It will initially send the simplified VirtualScan to the proxy. If the proxy is old, it will throw an UNSUPPORTED_QUERY_VERSION exception. The driver will then downgrade its version and will start sending the full VirtualScan to the proxy.

Copy link
Member

@jinzha jinzha Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HI @markoszah, the decrementQueryVersion() seems need to be enhanced to support V5 -> V4 -> V3 accordingly, currently it supports V4 -> V3 only.

jinzha
jinzha previously approved these changes Jan 8, 2025
@markoszah markoszah merged commit 89908e7 into main Jan 9, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants