YottaDB / YDB

Mirrored from https://gitlab.com/YottaDB/DB/YDB
Other
76 stars 37 forks source link

Make TPNOTACID message more informative in case of /WAIT, /PASS, /ACCEPT or /TLS usages #323

Closed nars1 closed 6 years ago

nars1 commented 6 years ago

The v63002/gtm8165 subtest created a scenario where TPNOTACID messages were sent to the syslog for a variety of command usages. For commands like HANG, LOCK or OPEN, it clearly indicated the name of the command that caused the message. An example message for the OPEN command is the below

%YDB-I-TPNOTACID, OPEN at opentimeout+5^gtm8165 violates ACID properties of a TRANSACTION and could exceed .123 seconds;

But when the command causing the TPNOTACID was a WRITE /WAIT or a WRITE /PASS or WRITE /ACCEPT or WRITE /TLS, the message read as follows

%YDB-I-TPNOTACID, FORMAT at writeslashpass+14^gtm8165 violates ACID properties of a TRANSACTION and could exceed .123 seconds;

Note the word FORMAT. I guess this is intended to indicate that a command involving a format character "/" was used. But it is not user-friendly. So this is fixed to indicate exactly which sub-command was specified. The message after the code fixes reads as follows.

%YDB-I-TPNOTACID, /PASS at writeslashpass+14^gtm8165 violates ACID properties of a TRANSACTION and could exceed .123 seconds;

It would be better if we can indicate WRITE /PASS, the full command, instead of just /PASS. But that information is lost in compilation so when control comes to iosocket_iocontrol.c, we do not know if we came there because of a WRITE /PASS or a READ /PASS. Both end up doing the same thing even though only WRITE /PASS etc. is documented (none of READ /WAIT, READ /PASS, READ /ACCEPT or READ /TLS is documented).