<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/libglusterfs/src/gfdb/gfdb_sqlite3.c, branch v3.7.9</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>all: reduce "inline" usage</title>
<updated>2016-01-18T09:02:34+00:00</updated>
<author>
<name>Kaleb S KEITHLEY</name>
<email>kkeithle@redhat.com</email>
</author>
<published>2015-11-18T17:28:42+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=50ae3e67e4f294925fc840d3f83b77f7072af54d'/>
<id>50ae3e67e4f294925fc840d3f83b77f7072af54d</id>
<content type='text'>
There are three kinds of inline functions: plain inline, extern inline,
and static inline.  All three have been removed from .c files, except
those in "contrib" which aren't our problem.  Inlines in .h files, which
are overwhelmingly "static inline" already, have generally been left
alone.  Over time we should be able to "lower" these into .c files, but
that has to be done in a case-by-case fashion requiring more manual
effort.  This part was easy to do automatically without (as far as I can
tell) any ill effect.

In the process, several pieces of dead code were flagged by the
compiler, and were removed.

backport of Change-Id: I56a5e614735c9e0a6ee420dab949eac22e25c155,
http://review.gluster.org/11769, BUG: 1245331

Change-Id: Iba1efb0bc578ea4a5e9bf76b7bd93dc1be9eba44
BUG: 1283302
Signed-off-by: Kaleb S KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12646
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are three kinds of inline functions: plain inline, extern inline,
and static inline.  All three have been removed from .c files, except
those in "contrib" which aren't our problem.  Inlines in .h files, which
are overwhelmingly "static inline" already, have generally been left
alone.  Over time we should be able to "lower" these into .c files, but
that has to be done in a case-by-case fashion requiring more manual
effort.  This part was easy to do automatically without (as far as I can
tell) any ill effect.

In the process, several pieces of dead code were flagged by the
compiler, and were removed.

backport of Change-Id: I56a5e614735c9e0a6ee420dab949eac22e25c155,
http://review.gluster.org/11769, BUG: 1245331

Change-Id: Iba1efb0bc578ea4a5e9bf76b7bd93dc1be9eba44
BUG: 1283302
Signed-off-by: Kaleb S KEITHLEY &lt;kkeithle@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12646
Smoke: Gluster Build System &lt;jenkins@build.gluster.com&gt;
NetBSD-regression: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
CentOS-regression: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctr/sql: Providing for vol set for sqlcachesize and sqlWALsize and skip recording path</title>
<updated>2015-12-22T22:45:20+00:00</updated>
<author>
<name>Joseph Fernandes</name>
<email>josferna@redhat.com</email>
</author>
<published>2015-12-15T12:59:06+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=a7de0cd095f799e3128f74fcccc57ac4d6fd0b6d'/>
<id>a7de0cd095f799e3128f74fcccc57ac4d6fd0b6d</id>
<content type='text'>
1. Providing vol set option for cache size and wal autocheck point
   so that performance can be tuned.
2. Removed recording of file path in the db. Trimming database columns.
   Path need not be stored in the db, as PARGFID, GFID, Basename is suffice
   to derive the path during migration.

Backport of http://review.gluster.org/12972

&gt; Change-Id: I2cb590451a6d244bc91fe66c6dbffe2c2059dfb8
&gt; BUG: 1293034
&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/12972
&gt; Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
&gt; Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;

Change-Id: Ia1c109983ec6ce75ed27b8c08f454f5b6283c31d
BUG: 1293659
Reviewed-on: http://review.gluster.org/13067
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. Providing vol set option for cache size and wal autocheck point
   so that performance can be tuned.
2. Removed recording of file path in the db. Trimming database columns.
   Path need not be stored in the db, as PARGFID, GFID, Basename is suffice
   to derive the path during migration.

Backport of http://review.gluster.org/12972

&gt; Change-Id: I2cb590451a6d244bc91fe66c6dbffe2c2059dfb8
&gt; BUG: 1293034
&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/12972
&gt; Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
&gt; Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;

Change-Id: Ia1c109983ec6ce75ed27b8c08f454f5b6283c31d
BUG: 1293659
Reviewed-on: http://review.gluster.org/13067
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tier/libgfdb/sql: Correcting logic in sql query for read</title>
<updated>2015-12-05T00:46:51+00:00</updated>
<author>
<name>Joseph Fernandes</name>
<email>josferna@redhat.com</email>
</author>
<published>2015-11-30T11:21:35+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d5df0db18b29b1db2577ac5ed388966c0eb203b0'/>
<id>d5df0db18b29b1db2577ac5ed388966c0eb203b0</id>
<content type='text'>
Correcting query in the  where clause

from "a &amp; b | c"

to "a &amp; (b | c)"

where "a" is the condition to join the gf_file_tb and gf_flink_tb
through gfids

"b" is the condition for the write heat
and "c" is the condition for read heat

Backport of http://review.gluster.org/12823

&gt; Change-Id: I99226d82b0efb68fbef3a40f02b215bb2b4370d6
&gt; BUG: 1286656
&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt; Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/12823
&gt; Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;

Change-Id: I70533c8589a6cd67e8737e110af0a23abed9013d
BUG: 1287583
Reviewed-on: http://review.gluster.org/12868
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Correcting query in the  where clause

from "a &amp; b | c"

to "a &amp; (b | c)"

where "a" is the condition to join the gf_file_tb and gf_flink_tb
through gfids

"b" is the condition for the write heat
and "c" is the condition for read heat

Backport of http://review.gluster.org/12823

&gt; Change-Id: I99226d82b0efb68fbef3a40f02b215bb2b4370d6
&gt; BUG: 1286656
&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt; Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/12823
&gt; Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;

Change-Id: I70533c8589a6cd67e8737e110af0a23abed9013d
BUG: 1287583
Reviewed-on: http://review.gluster.org/12868
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tier/libgfdb: Extending log level flexibity in libgfdb</title>
<updated>2015-11-12T01:48:33+00:00</updated>
<author>
<name>Joseph Fernandes</name>
<email>josferna@redhat.com</email>
</author>
<published>2015-11-10T17:20:55+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=cdda95b317ea63f30d79a7536f8881aca03c136e'/>
<id>cdda95b317ea63f30d79a7536f8881aca03c136e</id>
<content type='text'>
Extending log level flexibity to relevant fops and operations
This is an extension to
http://review.gluster.org/#/c/12491/

Backport of http://review.gluster.org/#/c/12567/

&gt; Change-Id: I33b2f7732f89f52569fb99baa692c7e3bb4c7ab1
&gt; BUG: 1277352
&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/12567
&gt; Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
&gt; Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;

Change-Id: Idcde04a65775ce98367967faf8a53b0f07ff022e
BUG: 1279059
Reviewed-on: http://review.gluster.org/12569
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extending log level flexibity to relevant fops and operations
This is an extension to
http://review.gluster.org/#/c/12491/

Backport of http://review.gluster.org/#/c/12567/

&gt; Change-Id: I33b2f7732f89f52569fb99baa692c7e3bb4c7ab1
&gt; BUG: 1277352
&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/12567
&gt; Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
&gt; Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;

Change-Id: Idcde04a65775ce98367967faf8a53b0f07ff022e
BUG: 1279059
Reviewed-on: http://review.gluster.org/12569
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tier/libgfdb: Replacing ASCII query file with binary</title>
<updated>2015-11-08T13:22:02+00:00</updated>
<author>
<name>Joseph Fernandes</name>
<email>josferna@redhat.com</email>
</author>
<published>2015-10-13T18:30:41+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=5c0e815f69a0fb1f9c3f9b5555642dcb2295f209'/>
<id>5c0e815f69a0fb1f9c3f9b5555642dcb2295f209</id>
<content type='text'>
Earlier, when the database was queried we used to save
all the queried records in an ASCII format in the query file.
This caused issues like filename having ASCII delimiter and used
to take a lot of space. The tier.c file also had a lot of parsing code.

Here we changed the format of the query file to binary.
All the logic of serialization and formating of query record is done
by libgfdb. Libgfdb provides API,
gfdb_write_query_record() and gfdb_read_query_record(),
which the user i.e tier migrator and CTR xlator can use to
write to and read from query file.
With this binary format we save on disk space i.e reduce to 50% atleast
as we are saving GFID's in binary format 16 bytes and not the string format
which takes 36 bytes + We are not saving path of the file + we are also saving on
ASCII delimiters.

The on disk format of query record is as follows,

+---------------------------------------------------------------------------+
| Length of serialized query record |       Serialized Query Record         |
+---------------------------------------------------------------------------+
             4 bytes                     Length of serialized query record
                                                      |
                                                      |
     -------------------------------------------------|
     |
     |
     V
   Serialized Query Record Format:
   +---------------------------------------------------------------------------+
   | GFID |  Link count   |  &lt;LINK INFO&gt;  |.....                      | FOOTER |
   +---------------------------------------------------------------------------+
     16 B        4 B         Link Length                                  4 B
                                |                                          |
                                |                                          |
   -----------------------------|                                          |
   |                                                                       |
   |                                                                       |
   V                                                                       |
   Each &lt;Link Info&gt; will be serialized as                                  |
   +-----------------------------------------------+                       |
   | PGID | BASE_NAME_LENGTH |      BASE_NAME      |                       |
   +-----------------------------------------------+                       |
     16 B       4 B             BASE_NAME_LENGTH                           |
                                                                           |
                                                                           |
   ------------------------------------------------------------------------|
   |
   |
   V
   FOOTER is a magic number 0xBAADF00D indicating the end of the record.
   This also serves as a serialized schema validator.

Backport of http://review.gluster.org/#/c/12354/

&gt; Change-Id: I9db7416fd421e118dd44eafab8b535caafe50d5a
&gt; BUG: 1272207
&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/12354
&gt; Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
&gt; Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;

Change-Id: I170c579027f2594a58706f826e3ddf89e34022f4
BUG: 1263619
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12535
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Earlier, when the database was queried we used to save
all the queried records in an ASCII format in the query file.
This caused issues like filename having ASCII delimiter and used
to take a lot of space. The tier.c file also had a lot of parsing code.

Here we changed the format of the query file to binary.
All the logic of serialization and formating of query record is done
by libgfdb. Libgfdb provides API,
gfdb_write_query_record() and gfdb_read_query_record(),
which the user i.e tier migrator and CTR xlator can use to
write to and read from query file.
With this binary format we save on disk space i.e reduce to 50% atleast
as we are saving GFID's in binary format 16 bytes and not the string format
which takes 36 bytes + We are not saving path of the file + we are also saving on
ASCII delimiters.

The on disk format of query record is as follows,

+---------------------------------------------------------------------------+
| Length of serialized query record |       Serialized Query Record         |
+---------------------------------------------------------------------------+
             4 bytes                     Length of serialized query record
                                                      |
                                                      |
     -------------------------------------------------|
     |
     |
     V
   Serialized Query Record Format:
   +---------------------------------------------------------------------------+
   | GFID |  Link count   |  &lt;LINK INFO&gt;  |.....                      | FOOTER |
   +---------------------------------------------------------------------------+
     16 B        4 B         Link Length                                  4 B
                                |                                          |
                                |                                          |
   -----------------------------|                                          |
   |                                                                       |
   |                                                                       |
   V                                                                       |
   Each &lt;Link Info&gt; will be serialized as                                  |
   +-----------------------------------------------+                       |
   | PGID | BASE_NAME_LENGTH |      BASE_NAME      |                       |
   +-----------------------------------------------+                       |
     16 B       4 B             BASE_NAME_LENGTH                           |
                                                                           |
                                                                           |
   ------------------------------------------------------------------------|
   |
   |
   V
   FOOTER is a magic number 0xBAADF00D indicating the end of the record.
   This also serves as a serialized schema validator.

Backport of http://review.gluster.org/#/c/12354/

&gt; Change-Id: I9db7416fd421e118dd44eafab8b535caafe50d5a
&gt; BUG: 1272207
&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/12354
&gt; Reviewed-by: N Balachandran &lt;nbalacha@redhat.com&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt; Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
&gt; Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;

Change-Id: I170c579027f2594a58706f826e3ddf89e34022f4
BUG: 1263619
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12535
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tier/ctr: Ignore CTR Lookup heal insert errors</title>
<updated>2015-11-07T18:32:33+00:00</updated>
<author>
<name>Joseph Fernandes</name>
<email>josferna@redhat.com</email>
</author>
<published>2015-11-03T06:38:16+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=f3b555e029e6531d914fb67e098929ffe03d161b'/>
<id>f3b555e029e6531d914fb67e098929ffe03d161b</id>
<content type='text'>
CTR doesnt read from the DB, so to make sure that file records are
created it does a heal during a lookup. It remembers the decision in
the inode context cache and retrys periodically. When the volume is
restarted it looses all the inode cache from the previous time and CTR
lookup heals tries the heal again, but this time it finds that the records
are already there from sql and logs this error, and remembers this until the
volume is restarted or inode is flushed out of inode cache of the brick.

Solution: the log levels should be reduced to trace for this case and
customers need not see this.

Backport of http://review.gluster.org/#/c/12491/

Change-Id: I5f11e83c306ae912a90f12220f62bb7563b8eb96
BUG: 1279059
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12534
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CTR doesnt read from the DB, so to make sure that file records are
created it does a heal during a lookup. It remembers the decision in
the inode context cache and retrys periodically. When the volume is
restarted it looses all the inode cache from the previous time and CTR
lookup heals tries the heal again, but this time it finds that the records
are already there from sql and logs this error, and remembers this until the
volume is restarted or inode is flushed out of inode cache of the brick.

Solution: the log levels should be reduced to trace for this case and
customers need not see this.

Backport of http://review.gluster.org/#/c/12491/

Change-Id: I5f11e83c306ae912a90f12220f62bb7563b8eb96
BUG: 1279059
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12534
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tier/ctr: Solution for db locks for tier migrator and ctr using sqlite version less than 3.7 i.e rhel 6.7</title>
<updated>2015-10-09T23:58:53+00:00</updated>
<author>
<name>Joseph Fernandes</name>
<email>josferna@redhat.com</email>
</author>
<published>2015-09-18T14:27:54+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=489f02879afd940d201d092720dbf13b2922b134'/>
<id>489f02879afd940d201d092720dbf13b2922b134</id>
<content type='text'>
Problem: On RHEL 6.7, we have sqlite version 3.6.2 which doesnt support
WAL journaling mode, as this journaling mode is only available in sqlite 3.7 and above.
As a result we cannot have to progreses concurrently accessing sqlite, without
running into db locks! Well WAL is also need for performace on CTR side.

Solution: This solution is to use CTR db connection for doing queries when WAL mode is
absent. i,e tier migrator will send sync_op ipc calls to CTR, which in turn will
do the query and create/update the query file suggested by tier migrator.

Pending: Well this solution will stop the db locks but the performance is still an issue for CTR.
We are developing an in-Memory Transaction Log (iMeTaL) which will help boost the CTR
performance by doing in memory udpates on the IO path and later flush the updates to
the db in a batch/segment flush.

Master patch: http://review.gluster.org/#/c/12191
&gt;&gt; Change-Id: Ie3149643ded159234b5cc6aa6cf93b9022c2f124
&gt;&gt; BUG: 1240577
&gt;&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt;&gt; Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
&gt;&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt;&gt; Reviewed-on: http://review.gluster.org/12191
&gt;&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt;&gt; Reviewed-by: Luis Pabon &lt;lpabon@redhat.com&gt;
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;

Change-Id: Ie8c7a7e9566244c104531b579126bb57fbc6e32b
BUG: 1270123
Reviewed-on: http://review.gluster.org/12325
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Problem: On RHEL 6.7, we have sqlite version 3.6.2 which doesnt support
WAL journaling mode, as this journaling mode is only available in sqlite 3.7 and above.
As a result we cannot have to progreses concurrently accessing sqlite, without
running into db locks! Well WAL is also need for performace on CTR side.

Solution: This solution is to use CTR db connection for doing queries when WAL mode is
absent. i,e tier migrator will send sync_op ipc calls to CTR, which in turn will
do the query and create/update the query file suggested by tier migrator.

Pending: Well this solution will stop the db locks but the performance is still an issue for CTR.
We are developing an in-Memory Transaction Log (iMeTaL) which will help boost the CTR
performance by doing in memory udpates on the IO path and later flush the updates to
the db in a batch/segment flush.

Master patch: http://review.gluster.org/#/c/12191
&gt;&gt; Change-Id: Ie3149643ded159234b5cc6aa6cf93b9022c2f124
&gt;&gt; BUG: 1240577
&gt;&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt;&gt; Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
&gt;&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt;&gt; Reviewed-on: http://review.gluster.org/12191
&gt;&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
&gt;&gt; Reviewed-by: Luis Pabon &lt;lpabon@redhat.com&gt;
Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;

Change-Id: Ie8c7a7e9566244c104531b579126bb57fbc6e32b
BUG: 1270123
Reviewed-on: http://review.gluster.org/12325
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tier/ctr: Solving DB Lock issue due to write contention from db connections</title>
<updated>2015-09-11T20:46:50+00:00</updated>
<author>
<name>Joseph Fernandes</name>
<email>josferna@redhat.com</email>
</author>
<published>2015-09-11T13:36:06+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=1d02d4bd9b5f7d730ab08961c17ef58204c8e8fd'/>
<id>1d02d4bd9b5f7d730ab08961c17ef58204c8e8fd</id>
<content type='text'>
This is a backport of 12031.

&gt; Problem: The DB on the brick is been accessed by CTR, for write and
&gt; tier migrator, for read and write. The write from tier migrator is reseting
&gt; the heat counters after a cycle. Since we are using sqlite, two connections
&gt; trying to write would cause a db lock contention. As a result CTR used to fail
&gt; to update the db.

&gt; Solution: Using the same db connection of CTR for reseting the heat counters.
&gt; 1) Introducted a new IPC FOP for CTR
&gt; 2) After the query do a ipc syncop to the underlying client xlator associated
&gt;    to the brick.
&gt; 3) CTR in brick will catch the IPC FOP and cleat the heat counters.

&gt; Change-Id: I53306bfc08dcdba479deb4ccc154896521336150
&gt; BUG: 1260730
&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/12031
&gt; Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;

Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;

Conflicts:
	xlators/cluster/dht/src/tier.c

Change-Id: I88aa289cdf21e216b42c3d8ccfb4e7e828b43772
BUG: 1262341
Reviewed-on: http://review.gluster.org/12161
Reviewed-by: Joseph Fernandes
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a backport of 12031.

&gt; Problem: The DB on the brick is been accessed by CTR, for write and
&gt; tier migrator, for read and write. The write from tier migrator is reseting
&gt; the heat counters after a cycle. Since we are using sqlite, two connections
&gt; trying to write would cause a db lock contention. As a result CTR used to fail
&gt; to update the db.

&gt; Solution: Using the same db connection of CTR for reseting the heat counters.
&gt; 1) Introducted a new IPC FOP for CTR
&gt; 2) After the query do a ipc syncop to the underlying client xlator associated
&gt;    to the brick.
&gt; 3) CTR in brick will catch the IPC FOP and cleat the heat counters.

&gt; Change-Id: I53306bfc08dcdba479deb4ccc154896521336150
&gt; BUG: 1260730
&gt; Signed-off-by: Joseph Fernandes &lt;josferna@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/12031
&gt; Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;

Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;

Conflicts:
	xlators/cluster/dht/src/tier.c

Change-Id: I88aa289cdf21e216b42c3d8ccfb4e7e828b43772
BUG: 1262341
Reviewed-on: http://review.gluster.org/12161
Reviewed-by: Joseph Fernandes
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Tested-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/tier: add gluster v tier &lt;vol&gt;</title>
<updated>2015-09-10T17:59:11+00:00</updated>
<author>
<name>Dan Lambright</name>
<email>dlambrig@redhat.com</email>
</author>
<published>2015-08-21T10:45:46+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=0628c77f9069e93c49993722ac577becfcf902db'/>
<id>0628c77f9069e93c49993722ac577becfcf902db</id>
<content type='text'>
This is a backport of 11984.

&gt; Currently the tier feature piggy backs off the rebalance command
&gt; syntax to obtain status and this is clumsy. Introduce a new
&gt; tier command that can do tier specific operations, starting
&gt; with volume status to display counters.

&gt; Old commands:
&gt; gluster volume attach-tier &lt;vol&gt; [replica count] {bricklist..}
&gt; gluster volume detach-tier &lt;vol&gt; {start|stop|commit}

&gt; New commands:
&gt; gluster volume tier &lt;vol&gt; attach [replica count] {bricklist} |
&gt;                           detach {start|stop|commit} |
&gt;                           status

&gt; Change-Id: Ic07b3c6260588162de7d34380f8cbd3d8a7f35d3
&gt; BUG: 1255693
&gt; Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/11984
&gt; Reviewed-by: Gaurav Kumar Garg &lt;ggarg@redhat.com&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;

Change-Id: Id45bd0fa6b8606dd47863de83a694908da393229
BUG: 1261664
Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12143
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Gaurav Kumar Garg &lt;ggarg@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a backport of 11984.

&gt; Currently the tier feature piggy backs off the rebalance command
&gt; syntax to obtain status and this is clumsy. Introduce a new
&gt; tier command that can do tier specific operations, starting
&gt; with volume status to display counters.

&gt; Old commands:
&gt; gluster volume attach-tier &lt;vol&gt; [replica count] {bricklist..}
&gt; gluster volume detach-tier &lt;vol&gt; {start|stop|commit}

&gt; New commands:
&gt; gluster volume tier &lt;vol&gt; attach [replica count] {bricklist} |
&gt;                           detach {start|stop|commit} |
&gt;                           status

&gt; Change-Id: Ic07b3c6260588162de7d34380f8cbd3d8a7f35d3
&gt; BUG: 1255693
&gt; Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
&gt; Reviewed-on: http://review.gluster.org/11984
&gt; Reviewed-by: Gaurav Kumar Garg &lt;ggarg@redhat.com&gt;
&gt; Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;

Change-Id: Id45bd0fa6b8606dd47863de83a694908da393229
BUG: 1261664
Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Reviewed-on: http://review.gluster.org/12143
Tested-by: Gluster Build System &lt;jenkins@build.gluster.com&gt;
Reviewed-by: Gaurav Kumar Garg &lt;ggarg@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cluster/tier: fix 64 bit issue with sql query using times</title>
<updated>2015-08-13T16:08:43+00:00</updated>
<author>
<name>Dan Lambright</name>
<email>dlambrig@redhat.com</email>
</author>
<published>2015-08-13T14:24:23+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=0e3c9029e1d022f2aadcac7c320b7c56069bc0c6'/>
<id>0e3c9029e1d022f2aadcac7c320b7c56069bc0c6</id>
<content type='text'>
This is a backport of 11885.

&gt; We overflowed when converting seconds to usecs in preperation for
&gt; sql queries. The fix uses uint64_t throughout including subexpressions.

&gt; Change-Id: I59bdb742197400dede97f54735b52030920b0d19
&gt; BUG: 1231268
&gt; Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;

Change-Id: Iaef7083dac7a162080f4bc23e29dedfe700fa342
BUG: 1252903
Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Reviewed-on: http://review.gluster.org/11913
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Joseph Fernandes
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a backport of 11885.

&gt; We overflowed when converting seconds to usecs in preperation for
&gt; sql queries. The fix uses uint64_t throughout including subexpressions.

&gt; Change-Id: I59bdb742197400dede97f54735b52030920b0d19
&gt; BUG: 1231268
&gt; Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;

Change-Id: Iaef7083dac7a162080f4bc23e29dedfe700fa342
BUG: 1252903
Signed-off-by: Dan Lambright &lt;dlambrig@redhat.com&gt;
Reviewed-on: http://review.gluster.org/11913
Tested-by: NetBSD Build System &lt;jenkins@build.gluster.org&gt;
Reviewed-by: Joseph Fernandes
</pre>
</div>
</content>
</entry>
</feed>
