Q/KDB+当同步指示将表格写入磁盘时,是否曾经表现出异步?

发布于 2025-01-22 20:54:24 字数 885 浏览 0 评论 0原文

我已经弹出了一个奇怪的错误 - 当我写入分区表中时,在同一表上选择A后,我会收到一个错误,例如:

./ 2018.04.23/ngbarx/cunadj。 OS报告:操作不允许

如果写出表格,我等待几秒钟后,就不会出现此错误。对我来说,这似乎是指着有一个缓存的情况,Q在操作完成之前做出响应,但是Afaik我正在做的一切都应该同步。

我很想了解我在做错什么 /确切导致此错误的原因 /哪些命令异步执行。

可怕的详细信息:

  • 上午从python编写,使用qpython3软件包同步连接到q,
  • ​​q会话是用从服务器启动的,即-s 4
  • 写下分区表,我正在使用可以找到的非官方函数.q.dcfgnt there
  • 我写信给AQ会话,该会话是用数据库目录初始化的,就像
  • 在使用.q.dc.dcfgnt, 使用分区表时一样。但是在执行选择之前,我也做.q.chk`:/db/;系统“ l /db /”; 。这些可能既是过度杀伤,又是错误的顺序,但我相信它们都是同步的电话,如果我错了,请纠正我。
  • 错误的触发器是10#从表中选择;我明白 为什么这是一个不好的主意 同样,从我的理解中,它不应该触发我遇到的特定错误。

I've had a strange bug pop up -- when I write to a partitioned table, then immediately after do a select on that same table, I get an error like:

./2018.04.23/ngbarx/cunadj. OS reports: Operation not permitted.

This error does not appear if, after writing the table, I wait a few seconds. This to me seems like pointing towards there being a caching situation, where q responds before an operation is complete, but afaik everything I am doing should be synchronous.

I would love to understand what I am doing wrong / what is causing this error exactly / which commands are executing asynchronously.

The horrible details:

  • Am writing from Python connected to q synchronously using the qpython3 package
  • The q session is launched with slaves i.e. -s 4
  • To write the partitioned table, I am using the unofficial function .Q.dcfgnt which can be found here
  • I write to a q session that was initialized with a database directory as is usual when dealing with partitioned tables
  • After writing the table with .Q.dcfgnt, but before doing the select, I also do .Q.chk`:/db/; system"l /db/"; .Q.cn table in that order, just to be sure the table is up and ready to use in the q session. These might be both overkill and in the wrong order, but I believe they are all synchronous calls afaik, please correct me if I am wrong.
  • The trigger to the error is a 10#select from table; I understand
    why this is a bad idea to do in general on a partitioned table, but
    also from my understanding it shouldn't be triggering the particular error that I am getting.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文