flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From StephanEwen <...@git.apache.org>
Subject [GitHub] flink pull request #5645: FLINK-8876 Improve concurrent access handling in s...
Date Wed, 07 Mar 2018 16:46:29 GMT
Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5645#discussion_r172907369
  
    --- Diff: flink-formats/flink-avro/src/main/java/org/apache/flink/formats/avro/typeutils/AvroSerializer.java
---
    @@ -163,8 +224,19 @@ public T copy(T from, T reuse) {
     
     	@Override
     	public void copy(DataInputView source, DataOutputView target) throws IOException {
    -		T value = deserialize(source);
    -		serialize(value, target);
    +		if (CONCURRENT_ACCESS_CHECK) {
    +			enterExclusiveThread();
    +		}
    +
    +		try {
    +			T value = deserialize(source);
    --- End diff --
    
    I think we can simply remove the check around the `copy(DataInputView source, DataOutputView
target)` because the respective critical parts (`serialize()` and `deserialize()`) are covered
already.


---

Mime
View raw message