Skip to content

Unknown compression magic code: 105 #457

@beijishiqidu

Description

@beijishiqidu

Environment

  • OS version:
  • JDK version: 1.8
  • ClickHouse Server version: 23.8.2.7
  • ClickHouse Native JDBC version: 2.7.1
  • (Optional) Spark version: N/A
  • (Optional) Other components' version: N/A

Error logs

isClosed: false
Exception in thread "main" java.lang.UnsupportedOperationException: Unknown compression magic code: 105
	at com.github.housepower.buffer.CompressedBuffedReader.readCompressedData(CompressedBuffedReader.java:101)
	at com.github.housepower.buffer.CompressedBuffedReader.readBinary(CompressedBuffedReader.java:45)
	at com.github.housepower.serde.BinaryDeserializer.readVarInt(BinaryDeserializer.java:47)
	at com.github.housepower.protocol.Response.readFrom(Response.java:29)
	at com.github.housepower.client.NativeClient.receiveResponse(NativeClient.java:207)
	at com.github.housepower.client.NativeClient.ping(NativeClient.java:113)
	at com.github.housepower.jdbc.ClickHouseConnection.isValid(ClickHouseConnection.java:213)
	at com.huawei.jdbc.NoEncryptJdbcClient.main(NoEncryptJdbcClient.java:30)

Steps to reproduce

When an error is reported when I query the system.settings_changes table, the current connection becomes invalid. Or it can no longer proceed with other query requests.

because this issue: #456

public static void main(String[] args) throws Exception {
        Class.forName("com.github.housepower.jdbc.ClickHouseDriver");
        Properties clickHouseProperties = new Properties();
        clickHouseProperties.put("user", "nethouse");
        clickHouseProperties.put("password", "xxxxxxx");
        Connection conn = DriverManager.getConnection("jdbc:clickhouse://10.185.206.152:9120/NETHOUSE",
            clickHouseProperties);
        try {
            ResultSet resultSet = conn.createStatement().executeQuery("select * from system.settings_changes");
        } catch (Throwable e) {
            // e.printStackTrace();
        }

        System.out.println("isClosed: " + conn.isClosed());
        System.out.println("isValid: " + conn.isValid(2));
        try {
            ResultSet resultSet = conn.createStatement().executeQuery("select * from system.clusters");
        } catch (SQLException e) {
            // e.printStackTrace();
        }
    }

Other descriptions

It's kind of like the #432 issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions