Skip to content

ConnectorX MsSQL encryptionlevel TimedOut error #707

Open
@boersmamarcel

Description

@boersmamarcel

What language are you using?

Rust

What version are you using?

0.3.3 as available in crates.io, but in addition I checked the change log of 0.4.0 which does not change the relevant lines of code to mitigate the bug. However, I didn't test it yet with 0.4.0.

What database are you using?

MS SQL

What dataframe are you using?

Arrow

Can you describe your bug?

Using the connectorx library with the Arrow DataFrames in Rust, an issue arises when the encryption level is set to NotSupported. This configuration causes an error during execution. Modifying the encryption level to Off resolves the problem.

What are the steps to reproduce the behavior?

If possible, please include a minimal simple example including:

let destination = get_arrow(&source_conn, None, &[queries.query.clone()]).expect("run failed");

It is based on the examples mentioned here. Where I use the default connection string. After a lot of debugging, the reason of the bug can be found in this function: src/sources/mssql/mod.rs.

The suggested fix is:

+++ b/connectorx/src/sources/mssql/mod.rs
@@ -96,7 +96,7 @@ pub fn mssql_config(url: &Url) -> Config {

     match params.get("encrypt") {
         Some(v) if v.to_lowercase() == "true" => config.encryption(EncryptionLevel::Required),
-        _ => config.encryption(EncryptionLevel::NotSupported),
+        _ => config.encryption(EncryptionLevel::Off),
     };

where we change the EncryptionLevel::NotSupported into EncryptionLevel::Off. As a result, we do not get the bug:

run failed: MsSQLArrowTransportError(Source(MsSQLRuntimeError(TimedOut)))
Database setup if the error only happens on specific data or data type

Not applicable, it holds for any table schema and data because it can't connect to the database at all.

Example query / code

See example in the replicate bug section.

What is the error?

We continuously get an TimedOut error:

run failed: MsSQLArrowTransportError(Source(MsSQLRuntimeError(TimedOut)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions