Description of problem: volume set encoding ascii still creates the changelogs in the binary format. Version-Release number of selected component (if applicable): [root@mustang ~]# rpm -q glusterfs glusterfs-3.4.0.12rhs.beta5-2.el6rhs.x86_64 How reproducible: Always Steps to Reproduce: 1. Create and start a volume 'hosdu' 2. gluster v set hosdu chanagelog-enabled on 3. gluster v set hosdu encoding ascii Actual results: [root@mustang ~]# gluster v i Volume Name: hosa-master Type: Distributed-Replicate Volume ID: f1b5ef32-ad22-4985-8778-083c876bc394 Status: Started Number of Bricks: 2 x 2 = 4 Transport-type: tcp Bricks: Brick1: spitfire:/rhs/bricks/brick1 Brick2: mustang:/rhs/bricks/brick2 Brick3: harrier:/rhs/bricks/brick3 Brick4: typhoon:/rhs/bricks/brick4 Options Reconfigured: changelog.rollover-time: 20 changelog.encoding: ascii diagnostics.latency-measurement: on diagnostics.count-fop-hits: on geo-replication.indexing: on The changelog files created are still binary format [root@mustang ~]# file /rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG /rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG: data [root@mustang ~]# less /rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG "/rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG" may be a binary file. See it anyway? If I choose 'yes' to the above question, garbage will be printed on my screen. Expected results: changelog should be logged in ascii format when set via CLI. Additional info:
The peculiarity here is, when there is no IO happening on the mount, the changelog generated will be empty. And in that case the format it ASCII [root@mustang ~]# file /rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG /rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG: ASCII text [root@mustang ~]# cat /rhs/bricks/brick2/.glusterfs/changelogs/CHANGELOG GlusterFS Changelog | version: v1.0 | encoding : 2 But whenever there is IO happening and there is actual data entry in the chaneglog, the format is binary.
It's an ASCII changelog because of the content viz. GFID and other records which are persisted in it's canonical form. The records themselves are separated with '\0' (which could be why you are prompted while cat'ing it). When the changelog is empty, there are no records and there is no prompt during viewing it.