snowflakedb / snowflakedb/snowflake-ingest-java

Ingest client close() hangs if there is no internet connection

Open
#830 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
83
Forks
70
Avg merge
1d 7h
Merged PRs (30d)
6

Description

If you create a SnowflakeStreamingIngestClient and then a channel and start sending data, then "pull the chord" or kill your internet and then try and clean up, the SnowflakeStreamingIngestClient.close() call hangs.

       // Close all channels
        if (this.outputChannels != null) {
            for (var channel : this.outputChannels.entrySet()) {
                try {
                    channel.getValue().close();
                } catch (Exception ignored) {
                }
            }
            this.outputChannels.clear();
        }

        // Close the client
        if (this.streamClient != null) {
            try {
                if (!this.streamClient.isClosed()) {
                    // This appears to hang indefinitely. As soon as I recover internet it works
                    this.streamClient.close();
             |
            } catch (Exception ignored) {
            }

            this.streamClient = null;
        }

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at SnowflakeStreamingIngestClient.close() and the shown streamClient.close() call; reproduce the issue by stopping internet access while a channel is sending data, then attempting cleanup. Done means client.close() returns without waiting indefinitely when the connection is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.