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

semijoin with empty right bat does not return immediately #6237

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

semijoin with empty right bat does not return immediately #6237

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working GDK Kernel normal

Comments

@monetdb-team
Copy link

Date: 2017-03-01 16:52:32 +0100
From: @swingbit
To: GDK devs <>
Version: 11.25.5 (Dec2016-SP1)

Last updated: 2017-03-31 13:28:43 +0200

Comment 25075

Date: 2017-03-01 16:52:32 +0100
From: @swingbit

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Build Identifier:

The following trace line looked strange to me:

| 312749 | C_161=<tmp_2405>[0]:bat[:oid] := algebra.subinter(X_131=<tmp_2344>[30395024]:bat[:oid],X_160=<tmp_2407>[0]:bat[:oid],nil:BAT,nil:BAT,false:bit,nil:lng);

312 milliseconds for a no-op (right bat is empty)

Looking at the code, I have the impression that joininitresults does not handle this case properly, i.e. it returns a result size equal to the count of the left bat. Hence, it allocates a result bat for 30395024 tuples, for nothing.

I didn't check carefully whether the actual join also misses an early-exit condition.

Reproducible: Always

$ mserver5 --version
MonetDB 5 server v11.25.10 (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993-July 2008 CWI
Copyright (c) August 2008-2017 MonetDB B.V., all rights reserved
Visit http://www.monetdb.org/ for further information
Found 15.6GiB available memory, 8 available cpu cores
Libraries:
libpcre: 8.40 2017-01-11 (compiled with 8.40)
openssl: OpenSSL 1.0.2j 26 Sep 2016 (compiled with OpenSSL 1.0.2j-fips 26 Sep 2016)
libxml2: 2.9.3 (compiled with 2.9.3)
Compiled by: roberto@photon.hq.spinque.com (x86_64-unknown-linux-gnu)
Compilation: gcc -g -Werror -Wall -Wextra -W -Werror-implicit-function-declaration -Wpointer-arith -Wdeclaration-after-statement -Wundef -Wformat=2 -Wno-format-nonliteral -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wpacked -Wunknown-pragmas -Wvariadic-macros -fstack-protector-all -Wstack-protector -Wpacked-bitfield-compat -Wsync-nand -Wjump-misses-init -Wmissing-include-dirs -Wlogical-op -Wunreachable-code
Linking : /usr/bin/ld -m elf_x86_64

Comment 25076

Date: 2017-03-01 17:37:15 +0100
From: MonetDB Mercurial Repository <>

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

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=310b7a4f966d

Changeset description:

Better check to see whether join result is empty.

This fixes bug #6237.
@monetdb-team monetdb-team added bug Something isn't working GDK Kernel normal labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GDK Kernel normal
Projects
None yet
Development

No branches or pull requests

2 participants