cancel
Showing results for 
Search instead for 
Did you mean: 

Curious "bug" with negative -s mode?

Flying
New Contributor II
I notice one interesting problem with the new negative -s mode since 3.1 -- query behaviour seems to differ to the point that innocent queries that run properly in positive -s mode fails in negative -s mode.

The code below demonstrates it (note: the problem only shows with splayed tables):

/ Start with negative -s in command line
/KDB+ 3.6 2019.04.02 Copyright (C) 1993-2019 Kx Systems
/w32/ 8()core 4095MB me my-host xxx.xxx.xxx.xxx NONEXPIRE

/
Setup database
N
:1000000;
{.Q.dd[`:./db;(`$string x;`T;`)]set@[;`sym;`p#].Q.en[`:./db]`sym xasc([]sym:N?`1;px:N?100.;size:N?1000)}each .z.D-til 3;
system
"l ./db";
tables
[]

/ Setup parallel slaves
ports
:55500+til neg system"s";
(system"start q . -p ",string@)each ports;
.z.pd:{n:abs system"s";$[n=count handles;handles;[hclose each handles;:handles::`u#hopen each ports]]}
handles:`
u#`int$();
system
"title MASTER";
.z.pd[]@\:({system"title ",string system"p"};`)

/ Test query
select size wavg px by sym from T where date=.z.D,sym in`
a  / This runs properly
select size wavg px by sym from T where date=.z.D,sym in`a`b  / This fails with 'length

Note that the last query above would have run properly with the q process was started with a positive -s mode.

My question: Is this indeed a bug in kdb+'s implementation of multi-process mode? Or is this more a "feature," whose documentation I missed?
2 REPLIES 2

charlie
New Contributor II
New Contributor II
that's a bug. We'll look into it.
thanks

Flying
New Contributor II
Thanks for the confirmation. ?

Hope this bug can be fixed soon...