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

mapi_timeout is not implemented #4056

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

mapi_timeout is not implemented #4056

monetdb-team opened this issue Nov 30, 2020 · 0 comments

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2016-08-23 12:39:59 +0200
From: Richard Hughes <<richard.monetdb>>
To: clients devs <>
Version: 11.21.19 (Jul2015-SP4)

Last updated: 2019-04-30 12:36:01 +0200

Comment 22318

Date: 2016-08-23 12:39:59 +0200
From: Richard Hughes <<richard.monetdb>>

Created attachment 401
Implement mapi_settimeout

Here's a patch to implement it.

Note that this changes the semantics of mnstr_settimeout in libstream based on the documentation in the changelog comment "a callback function (no arguments, int result) that should return TRUE if the timeout should cause the function to abort or continue what it was doing". The previous code would act on the callback function even if the timeout hadn't expired. The only existing user of that feature (monetdb5/mal/mal_session.c) looks like it would be happy with either semantic.

Attached file: monetdb-mapi_settimeout.diff (text/plain, 1861 bytes)
Description: Implement mapi_settimeout

Comment 26835

Date: 2019-01-22 14:41:28 +0100
From: MonetDB Mercurial Repository <>

Changeset 771a2d5a9079 made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=771a2d5a9079

Changeset description:

Check for timeout after check for error and only if no data.
Also, implement the check for the timeout function in accordance with
the comment (no function is equivalent to a function returning true).
This does the same as what the patch in bug #4056 does.

Comment 26836

Date: 2019-01-22 15:02:40 +0100
From: @sjoerdmullender

The essence of the patch has been taken over.

However, this does not mean that mapi_settimeout now causes the query to be stopped when it takes too long, only that the library stop listening for an answer. The application using this can cause the query to (eventually) stop by closing the connection after the timeout triggered (and then opening a new connection if it wants to do more). The closed connection will be noticed in the server and cause the query to be aborted.

Still closing since the patch was incorporated.

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

Successfully merging a pull request may close this issue.

None yet
1 participant