Skip to content

[Go] ipc writer is not concurrency safe #55

Closed

Description

@sunpe

Describe the bug, including details regarding any error messages, version, and platform.

Ipc writer is not concurrency safe. When using ipc writer under concurrent conditions, schema data may be written multiple times. And the data sink may crash with an error.

Demo as below:

schema := arrow.NewSchema(...)

address, err := net.ResolveTCPAddr("tcp", '127.0.0.1')
if err!=nil {
    ...
}
conn, err := net.DialTCP("tcp", nil, address)
if err!=nil {
    ...
}

writer := ipc.NewWriter(conn, ipc.WithSchema(schema))

record  :=  ... // create record
for i:=0; i< 10; i++ {
    go func() {
        if err = writer.Write(record); err != nil {
             ...
        }
    }()
}

Component(s)

Go

Activity

  1. added
    Type: bug
    on Apr 25, 2023
  2. changed the title [-]Ipc writer in concurrent will write schema twice[/-] [+]ipc writer is not concurrency safe[/+] on Apr 25, 2023
  3. changed the title [-]ipc writer is not concurrency safe[/-] [+][Go] ipc writer is not concurrency safe[/+] on Apr 25, 2023
  4. vibhatha commented on May 16, 2023

    @vibhatha
    Contributor

    take

  5. zeroshade commented on Sep 14, 2023

    @zeroshade
    Member

    @vibhatha Do you still intend on working on this?

  6. vibhatha commented on Jun 2, 2024

    @vibhatha
    Contributor

    @zeroshade I am extremely sorry I have missed your message here. I am not planning to work on it at the moment. Sorry about that.

  7. removed their assignment
    on Jun 2, 2024
  8. transferred this issue fromapache/arrowon Aug 30, 2024
  9. added a commit that references this issue on Jun 19, 2026
    3979556
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions