Skip to content

Conversation

@hailin0
Copy link
Member

@hailin0 hailin0 commented Sep 22, 2023

Purpose of this pull request

Fix WriteStrategy parallel writing thread unsafe issue

Thread unsafe exception occurs when parallel writes are run on a single node, should not shares thread unsafe object to writers.

Does this PR introduce any user-facing change?

No

How was this patch tested?

e2e already exists

Check list

…safe issue

Thread unsafe exception occurs when parallel writes are run on a single node,
should not shares thread unsafe object to writers.
@hailin0
Copy link
Member Author

hailin0 commented Sep 22, 2023

image

@lightzhao
Copy link
Contributor


Which variable in this method is thread-unsafe?

@Hisoka-X Hisoka-X merged commit 1177d02 into apache:dev Sep 26, 2023
@Hisoka-X
Copy link
Member

Which variable in this method is thread-unsafe?

@lightzhao WriteStrategy implement class, like LinkedHashMap<String, Writer> beingWrittenWriter in OrcWriteStrategy

@lightzhao
Copy link
Contributor

Which variable in this method is thread-unsafe?

@lightzhao WriteStrategy implement class, like LinkedHashMap<String, Writer> beingWrittenWriter in OrcWriteStrategy

ok, The modification is indeed more thread-safe. but judging from the exception screenshot, it has nothing to do with this variable.

@hailin0
Copy link
Member Author

hailin0 commented Sep 26, 2023

Which variable in this method is thread-unsafe?

@lightzhao WriteStrategy implement class, like LinkedHashMap<String, Writer> beingWrittenWriter in OrcWriteStrategy

ok, The modification is indeed more thread-safe. but judging from the exception screenshot, it has nothing to do with this variable.

@lightzhao

thread-unsafe class:org.apache.orc.impl.Writerimpl

reference
yuokada/embulk-output-orc#7
yuokada/embulk-output-orc#10

gnehil pushed a commit to gnehil/seatunnel that referenced this pull request Oct 12, 2023
…safe issue (apache#5546)

Thread unsafe exception occurs when parallel writes are run on a single node,
should not shares thread unsafe object to writers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants