You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by ie...@apache.org on 2019/01/23 08:55:29 UTC

[avro] branch master updated: AVRO-2306: Fix data corruption issue with snappy in Python 3

This is an automated email from the ASF dual-hosted git repository.

iemejia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/master by this push:
     new 384061c  AVRO-2306: Fix data corruption issue with snappy in Python 3
384061c is described below

commit 384061c05720287aa93a756a742aab2572b75e79
Author: Charles Chen <cc...@google.com>
AuthorDate: Tue Jan 22 17:46:51 2019 -0800

    AVRO-2306: Fix data corruption issue with snappy in Python 3
---
 lang/py3/avro/datafile.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lang/py3/avro/datafile.py b/lang/py3/avro/datafile.py
index 2a22e57..80e0ab6 100644
--- a/lang/py3/avro/datafile.py
+++ b/lang/py3/avro/datafile.py
@@ -283,7 +283,7 @@ class DataFileWriter(object):
     self.writer.write(compressed_data)
 
     # Write CRC32 checksum for Snappy
-    if self.GetMeta(CODEC_KEY) == 'snappy':
+    if codec == 'snappy':
       self.encoder.write_crc32(uncompressed_data)
 
     # write sync marker