Pesquisar

Artigo
· Nov. 8, 2024 2min de leitura

Débogage d'une erreur <ILLEGAL VALUE> de $zf(-100) qui ne se produit que sous Linux

Résumé : si vous concaténez des noms de fichiers dans /STDOUT et /STDERR dans un appel $zf(-100), mettez-les entre guillemets.

J'ai rencontré une erreur <ILLEGAL VALUE> qui m'a d'abord déconcerté. Cela faisait partie d'un test unitaire qui fonctionnait parfaitement bien sous Windows, mais lorsque CI s'exécutait sur Docker, il échouait :

Set outFile = ##class(%Library.File).TempFilename()
Set outDir = ##class(%Library.File).NormalizeDirectory(##class(%Library.File).TempFilename()_"dir-out")
Do ##class(%Library.File).CreateDirectoryChain(outDir)
Do $$$AssertEquals($zf(-100,"/STDOUT="_outFile_"/STDERR="_outFile,"tar","-xvf",tempDir_".tgz","-C",outDir)

Le problème, qui semble douloureusement évident une fois que vous connaissez la réponse, est que sous Linux outFile contient des barres obliques, donc elles sont interprétées comme des indicateurs de mot-clé pour $zf(-100) et bien sûr ne sont pas valides. L'erreur <ILLEGAL VALUE>
est en fait utile ici, et la solution est de mettre les noms de fichiers entre guillemets :

Set outFile = ##class(%Library.File).TempFilename()
Set outDir = ##class(%Library.File).NormalizeDirectory(##class(%Library.File).TempFilename()_"dir-out")
Do ##class(%Library.File).CreateDirectoryChain(outDir)
Do $$$AssertEquals($zf(-100,"/STDOUT="""_outFile_"""/STDERR="""_outFile_"""","tar","-xvf",tempDir_".tgz","-C",outDir)

Je poste ceci principalement pour que si quelqu'un demande à l'IA de la communauté des développeurs « Pourquoi est-ce que j'obtiens une erreur <ILLEGAL VALUE> de $zf(-100) », cela apparaisse. La réponse initiale ici était en fait très utile, elle ne couvrait simplement pas mon erreur spécifique.

Discussão (0)1
Entre ou crie uma conta para continuar
Artigo
· Nov. 8, 2024 1min de leitura

QuinielaML - Predicción de la 21ª jornada de la Quiniela

¿Viernes? ¿Cómo que viernes ya? ¿Otra vez? ¡Y yo con estos pelos! Pues nada, venga, aprovechemos el día y cumplimentemos la quiniela de rigor, esta jornada nuevamente es una jornada normal, sin ningún tipo de partido extraño de la liga austrohúngara, jornada 13ª de Primera División y jornada 14ª de Segunda.

Recordad que la pasada jornada tuvimos 10 aciertos, desafortunadamente sin premio. Veamos qué partidos entran:

Predicciones para los partidos de Primera División (el partido Espanyol - Valencia se realizará por sorteo):

Y para Segunda División (el Tenerife - Levante se realizará por sorteo):

Por lo que la Quiniela quedará de esta forma:

¿Ninguna victoria visitante?

Shrek Meme - Shrek - Discover & Share GIFs

Discussão (0)1
Entre ou crie uma conta para continuar
Pergunta
· Nov. 8, 2024

External language server IRIS to IRIS?

Intersystems provides External language server connections for various languages which,
from a development perspective, is great as I can keep my application code separate but still interact with the IRIS kernel.

It becomes more complex though if you are using Interoperability etc where you might end up with some code in IRIS and some code in another language.

What would be great is having an IRIS to IRIS language server where the application code and stay IRIS based but separate from the database?

5 Comments
Discussão (5)1
Entre ou crie uma conta para continuar
Pergunta
· Nov. 7, 2024

how to get notification that a web client has disconnected when using EnsLib.SOAP.Service/EnsLib.REST.Service

We've got some web services that utilise EnsLib.SOAP.Service/EnsLib.REST.Service. These do some further requests to a few operations to call some other services and return the combined results.

An issue that we are noticing is that some of the usage involves users hitting the refresh button a few too many times and generating a lot of requests. This is mostly an issue when the service that the operations are calling are down or slow to respond. IRIS starts using a lot of RAM when this occurs and has caused outages by getting through an extra 50-60GB of RAM.

I'm looking at possible ways to help prevent the unintended denial of service that result.

Does IRIS have any ability to get notification of prematurely closed client connections from calls through httpd using the csp_module_sa module? I've only seen that it just displays the error when it fails to send the result back, but can't see if there is any eventing of the connection status.

Other solutions involve counting how many active sessions are in place and just denying access when the session count exceeds a threshold. I thought of possibly adding a counter that increases when at the start of the service and decreases at the end. I haven't checked to see if sessions are always returned as cancelled if manually removed. Is there anything like this that already exists?

 

I'm aware that an API manager may help with this situation, but need a stopgap measure.

Discussão (0)1
Entre ou crie uma conta para continuar
Artigo
· Nov. 7, 2024 3min de leitura

第十四章 本地进程间通信(管道) - 用于进程间通信的 CLOSE 命令

第十四章 本地进程间通信(管道) - 用于进程间通信的 CLOSE 命令

用于进程间通信的 CLOSE 命令

如果使用带Q (/QUEUE) 参数代码的OPEN创建子进程,则该子进程可能会在设备上的CLOSE操作中继续存在。排队的进程间通信管道的生存能力取决于平台。在 UNIX® 系统上,子进程始终在CLOSE后继续存在。在 Windows 系统上,进程的生存取决于进程的年龄。刚刚启动的子进程不会在CLOSE操作中幸存,但是一旦子进程完全建立,它就会在 CLOSE操作中幸存。

Discussão (0)1
Entre ou crie uma conta para continuar