Make deadlock detection within DataConverter optional

Hi,
I currently have a DataConverter implemented that talks to a remote server for encrypting/decrypting data. The temporal java-sdk seems to be thinking that there is a deadlock when the remote server takes a little long to respond. According to other posts I’ve seen on this forum it looks like the deadlock detection timeout is 1s. Is there a way to make this optional in the java-sdk 1.7.1?

Looking at the sdk-go project there is a dataconverter that can be instantiated without deadlock detection.

There’s an open issue in the library to get this done. I was wondering if it has picked up any traction?

For Java SDK see feature request here.

when the remote server takes a little long to respond

Is is requirement to offload the encryption/decryption to a remove service? Have seen this type of use case before and user changed it to only get the encrypt keys from service and do the actual work on the worker (inside data converter).
It’s not typically recommended to do the encrypt/decrypt locally on workers, not remotely.

Just wanted to add, SDK does allow you to change the default deadlock detection timeout via

WorkerOptions.newBuilder().setDefaultDeadlockDetectionTimeout

but this is not something recommended to do.

Yea as a workaround I’m increasing the timeout using the WorkflowOptions builder. Can there be any unforeseen issues with configuring this value?

Thanks.

using the WorkflowOptions builder

Do you mean WorkerOptions right?

Can there be any unforeseen issues with configuring this value?

I think in general relying on third party services to encrypt/decrypt could lead to possible issues. If you for example have a larger number of input parameters (to activity, local activity, child workflow) and let’s say it takes seconds to encode/decode each (payload) i think you can run into workflow task timeouts (default 10s) fairly easily.

Think best to really use this as a temporary workaround, and try to do encryption/decryption locally on worker.

Yea WorkerOptions my bad.

I’ll look into encrypting locally. Thanks for the input.