trillian icon indicating copy to clipboard operation
trillian copied to clipboard

When a SQL error occurs, clean up all prepared statement.

Open px3303 opened this issue 2 years ago • 5 comments

As described in #420 , when the prepared statement fails unexpectedly in the database, the program cannot be recovered.

This PR will clear all the prepared statements in the cache when the statement execution error occurs (this is because other prepared statements may also make errors).

  • [ ] I have updated the CHANGELOG.
  • [ ] I have updated documentation accordingly (including the feature implementation matrix).

px3303 avatar Mar 15 '23 08:03 px3303

/gcbrun

mhutchinson avatar Mar 15 '23 11:03 mhutchinson

/gcbrun

AlCutter avatar Mar 15 '23 14:03 AlCutter

@px3303 Would you mind adding a small bit of text to the CHANGELOG to capture this? It's an important change which definitely should be highlighted in the next release's set of release notes.

AlCutter avatar Mar 15 '23 14:03 AlCutter

@px3303 Looks like the metric name needs a tweak, might be the "-": Step #14 - "integration_mariadb": panic: descriptor Desc{fqName: "mysql_cleared_prepared-statement_caches", help: "Number of times the prepared-statement cache has been cleared", constLabels: {}, variableLabels: []} is invalid: "mysql_cleared_prepared-statement_caches" is not a valid metric name

AlCutter avatar Mar 15 '23 14:03 AlCutter

@AlCutter @Martin2112 @mhutchinson

I submitted an improved version #2937 , please review it again.

px3303 avatar Mar 17 '23 08:03 px3303