This is an automated email from the ASF dual-hosted git repository.
weichiu pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 6219247 Fix thread safety of EC decoding during concurrent preads
(#3881)
6219247 is described below
commit 62192478b27eea1265d47c49652d3ed28102c7a4
Author: daimin <[email protected]>
AuthorDate: Fri Feb 11 10:20:00 2022 +0800
Fix thread safety of EC decoding during concurrent preads (#3881)
(cherry picked from commit 0e74f1e467fde9622af4eb8f18312583d2354c0f)
(cherry picked from commit 9071c9646c7d86706581d523a084a8584f2cdcab)
---
.../apache/hadoop/io/erasurecode/rawcoder/RawErasureDecoder.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureDecoder.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureDecoder.java
index 249930e..2ebe94b 100644
---
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureDecoder.java
+++
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/RawErasureDecoder.java
@@ -81,7 +81,7 @@ public abstract class RawErasureDecoder {
* @param outputs output buffers to put decoded data into according to
* erasedIndexes, ready for read after the call
*/
- public void decode(ByteBuffer[] inputs, int[] erasedIndexes,
+ public synchronized void decode(ByteBuffer[] inputs, int[] erasedIndexes,
ByteBuffer[] outputs) throws IOException {
ByteBufferDecodingState decodingState = new ByteBufferDecodingState(this,
inputs, erasedIndexes, outputs);
@@ -130,7 +130,7 @@ public abstract class RawErasureDecoder {
* erasedIndexes, ready for read after the call
* @throws IOException if the decoder is closed.
*/
- public void decode(byte[][] inputs, int[] erasedIndexes, byte[][] outputs)
+ public synchronized void decode(byte[][] inputs, int[] erasedIndexes,
byte[][] outputs)
throws IOException {
ByteArrayDecodingState decodingState = new ByteArrayDecodingState(this,
inputs, erasedIndexes, outputs);
@@ -163,7 +163,7 @@ public abstract class RawErasureDecoder {
* erasedIndexes, ready for read after the call
* @throws IOException if the decoder is closed
*/
- public void decode(ECChunk[] inputs, int[] erasedIndexes,
+ public synchronized void decode(ECChunk[] inputs, int[] erasedIndexes,
ECChunk[] outputs) throws IOException {
ByteBuffer[] newInputs = CoderUtil.toBuffers(inputs);
ByteBuffer[] newOutputs = CoderUtil.toBuffers(outputs);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]