Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1052727

Summary: Linearstore: Checksums not implemented in record tail
Product: Red Hat Enterprise MRG Reporter: Kim van der Riet <kim.vdriet>
Component: qpid-cppAssignee: Kim van der Riet <kim.vdriet>
Status: CLOSED CURRENTRELEASE QA Contact: Zdenek Kraus <zkraus>
Severity: unspecified Docs Contact:
Priority: medium    
Version: DevelopmentCC: esammons, iboverma, jross, kim.vdriet, zkraus
Target Milestone: 3.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qpid-cpp-0.22-33 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-21 12:54:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 709325    

Description Kim van der Riet 2014-01-13 23:22:24 UTC
The linearstore now implements a 32-bit checksum in the record tail to check data integrity of the xid and data sections of the record. These have not been implemented (the value 0x0 is hardwired currently) and need some developement effort.

Comment 1 Kim van der Riet 2014-01-13 23:23:49 UTC
Upstream bug: https://issues.apache.org/jira/browse/QPID-5358

Comment 2 Kim van der Riet 2014-01-13 23:25:17 UTC
Fixed in r.1547601

See upstream bug (comment 1) for further comments.

Comment 3 Zdenek Kraus 2014-02-20 08:28:25 UTC
Could you please describe implemeted checksum, like where it is written, for which items is computed, etc. ?

Comment 4 Kim van der Riet 2014-03-06 17:04:49 UTC
The checksum is calculated for the entire record except the record tail, ie header, xid (if present) and data (if present).

The checksum uses the Adler-32 algorithm, and is implemented in the store in linearstore/jrounal/Checksum.h, cpp.

There is a Python equivalent in zlib which I use in the linearstore file analyzer, and can be used as follows:

import zlib
def adler32(data):
    return slib.adler32(data) & 0xffffffff

and will return identical results to the c++ version for the same data.

Comment 5 Zdenek Kraus 2014-03-12 14:17:08 UTC
This was checked on RHEL 6.5 i386 & x86_64 with packages:

perl-qpid-0.22-7.el6
python-qpid-0.22-11.el6
python-qpid-qmf-0.22-27.el6
qpid-cpp-client-0.22-35.el6
qpid-cpp-client-devel-0.22-35.el6
qpid-cpp-client-devel-docs-0.22-35.el6
qpid-cpp-debuginfo-0.22-35.el6
qpid-cpp-server-0.22-35.el6
qpid-cpp-server-devel-0.22-35.el6
qpid-cpp-server-ha-0.22-35.el6
qpid-cpp-server-linearstore-0.22-35.el6
qpid-cpp-server-xml-0.22-35.el6
qpid-java-client-0.22-6.el6
qpid-java-common-0.22-6.el6
qpid-java-example-0.22-6.el6
qpid-jca-0.22-2.el6
qpid-jca-xarecovery-0.22-2.el6
qpid-proton-c-0.6-1.el6
qpid-proton-c-devel-0.6-1.el6
qpid-proton-debuginfo-0.6-1.el6
qpid-qmf-0.22-27.el6
qpid-qmf-debuginfo-0.22-27.el6
qpid-snmpd-1.0.0-15.el6
qpid-snmpd-debuginfo-1.0.0-15.el6
qpid-tools-0.22-8.el6
ruby-qpid-qmf-0.22-27.el6

-> VERIFIED

Comment 6 Zdenek Kraus 2014-09-04 15:44:44 UTC
Since this was a check / review setting qe_test_coverage-