Error while running Temporal on TiDB


I’m trying to test Temporal on TiDB and see the below error message in the history server when trying to start an execution:

{“level”:“error”,“ts”:“2022-03-10T23:35:44.820Z”,“msg”:“Operation failed with internal error.”,“service”:“history”,“temporal-error”:“Failed to lock shard with ID: 264. Error: Error 1235: function LOCK IN SHARE MODE has only noop implementation in tidb now, use tidb_enable_noop_functions to enable these functions”

From TiDB documentation:

Setting tidb_enable_noop_functions=1 might lead to unexpected behaviors in your application, because it permits TiDB to ignore certain syntax without providing an error

Is it safe to use this flag in a production environment? Have you heard of customers using Temporal on TiDB?

I’m unable to find where Temporal is setting the tidb_enable_noop_functions flag. Could it be coming from your system variables?

This error comes from TiDB itself, maybe you need to set it to OFF/ON, see System Variables | PingCAP Docs

Depending on version used the default could be 1 if not set? might be worth checking on this in TiDB code.

Hi arjunraman,

We have never tested Temporal with TiDB. It would be great if you run unit and integration tests on top of it and share the results. You can find instructions on how to run tests locally here.
But this error message looks scary to me. It seems like TiDB doesn’t support LOCK IN SHARE MODE and it is there for a reason.

Thanks for the reply @alex . I’d be happy to run the tests. I’ll take a look and get started. One question on LOCK IN SHARE MODE. Right now, i’ve bypassed this by essentially turning on the noop mode, but i’m skeptical of the side effects it could have on the temporal side. What could be the potential consequences of using the noop mode ?