Re: [Maria-discuss] Known limitation with TokuDB in Read Free Replication & parallel replication ?

2016-08-07 Thread jocelyn fournier

Hi Kristian,


Just FYI I confirm the "Lock wait timeout exceeded; try restarting 
transaction" behaviour you described.


I've duplicated & modified the rpl_parallel_optimistic.test and run it 
into storage/tokudb/mysql-test/tokudb_rpl/t/rpl_parallel_optimistic.test :


./mtr --suite=tokudb_rpl <1:33:48
Logging: ./mtr  --suite=tokudb_rpl
vardir: /home/joce/mariadb-10.1.16/mysql-test/var
Checking leftover processes...
Removing old var directory...
Creating var directory '/home/joce/mariadb-10.1.16/mysql-test/var'...
Checking supported features...
MariaDB Version 10.1.16-MariaDB-debug
 - SSL connections supported
 - binaries are debug compiled
Using suites: tokudb_rpl
Collecting tests...
Installing system database...
==

TEST  RESULT   TIME (ms) or COMMENT
--

worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
worker[1] mysql-test-run: WARNING: running this script as _root_ will 
cause some tests to be skipped

tokudb_rpl.rpl_parallel_optimistic 'innodb_plugin,mix' [ fail ]
Test ended at 2016-08-08 01:26:34

CURRENT_TEST: tokudb_rpl.rpl_parallel_optimistic
mysqltest: In included file "./include/sync_with_master_gtid.inc":
included from 
/home/joce/mariadb-10.1.16/storage/tokudb/mysql-test/tokudb_rpl/t/rpl_parallel_optimistic.test 
at line 59:

At line 50: Failed to sync with master

The result from queries just before the failure was:
< snip >
DELETE FROM t1 WHERE a=2;
INSERT INTO t1 VALUES (2,5);
DELETE FROM t1 WHERE a=3;
INSERT INTO t1 VALUES(3,2);
DELETE FROM t1 WHERE a=1;
INSERT INTO t1 VALUES(1,2);
DELETE FROM t1 WHERE a=3;
INSERT INTO t1 VALUES(3,3);
DELETE FROM t1 WHERE a=2;
INSERT INTO t1 VALUES (2,6);
include/save_master_gtid.inc
SELECT * FROM t1 ORDER BY a;
ab
12
26
33
include/start_slave.inc
include/sync_with_master_gtid.inc
Timeout in master_gtid_wait('0-1-20', 120), current slave GTID position 
is: 0-1-3.
Slave state : Waiting for master to send event127.0.0.1 root
160001master-bin.013468 slave-relay-bin.02796
master-bin.01YesNo 1205Lock wait 
timeout exceeded; try restarting transaction07723790
None0 NoNo01205Lock 
wait timeout exceeded; try restarting transaction1 Slave_Pos
0-1-20optimistic



I've no explanation so far for the DUPLICATE KEY error I've seen.


  Jocelyn


Le 15/07/2016 à 17:09, Kristian Nielsen a écrit :

jocelyn fournier  writes:


Thanks for the quick answer! I wonder if it would be possible the
automatically disable the optimistic parallel replication for an
engine if it does not implement it ?

That would probably be good - though it would be better to just implement
the necessary API, it's a very small change (basically TokuDB just needs to
inform the upper layer of any lock waits that take place inside).

However, looking more at your description, you got a "key not found"
error. Not implementing the thd_report_wait_for() could lead to deadlocks,
but it shouldn't cause key not found. In fact, in optimistic mode, all
errors are treated as "deadlock" errors, the query is rolled back, and
run again, this time not in parallel.

So I'm wondering if there is something else going on. If transactions T1 and
T2 run in parallel, it's possible that they have a row conflict. But if T2
deleted a row expected by T1, I would expect T1 to wait on a row lock held
by T2, not get a duplicate key error. And if T1 has not yet inserted a row
expected by T2, then T2 would be rolled back and retried after T1 has
committed. The first can cause deadlock, but neither case seems to cause
duplicate error.

Maybe TokuDB is doing something special with locks around replication, or
something else goes wrong. I guess TokuDB just hasn't been tested much with
parallel replication.

Does it work ok when running in conservative parallel mode?

  - Kristian.



___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Help on ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

2016-08-07 Thread Karthick Subramanian
Hi Sergei,

Thank you for your time on commenting on my question.

For others who may face this error in future and not yet find a solution
yet, below is the solution worked for me, its mostly due to SELINUX if you
are in Cent OS 7 or RHEL 7 or whatever version with SELINUX enabled:

-- if we get password policy not met error and error or warning says:

Warning message:

+-+--++
| Level   | Code | Message
   |
+-+--++
| Warning | 1819 | cracklib: error loading dictionary
  |
| Error   | 1819 | Your password does not satisfy the current policy
requirements |
+-+--++

Then this is due to SELinux issue. We have to set the context to grant
access to cracklib dir.
Description When using default settings cracklib tries to read the password
database from /usr/share/cracklib/. When using the standard SELINUX profile
mysqdl doesn't have access to that directory though.

You can use SHOW VARIABLES WHERE Variable_Name LIKE "%dir" to get the
cracklib dir name.

Workarounds:

* add additional access rules:
{code:bash}
semanage fcontext -a -t mysqld_etc_t "/usr/share/cracklib(/.*)?"
restorecon -Rv /usr/share/cracklib
{code}
* or copy cracklib dictionary to mysqld datadir and set
cracklib_password_check_dictionary accordingly

Thank you all for your time on helping me to resolve this.


On Sat, Aug 6, 2016 at 11:48 PM, Sergei Golubchik  wrote:

> Hi, Karthick!
>
> On Jul 03, Karthick Subramanian wrote:
> > Dear Experts,
> >
> > I almost tried all sort of combinations that I think of very difficult to
> > crack, but repeatedly failed to satisfy MariaDB not throw this error.
> >
> > Can anyone guide me on what is the specific needs for successful
> password.
> >
> > Warning message:
> >
> > +-+--+--
> --+
> > | Level   | Code | Message
>   |
> > +-+--+--
> --+
> > | Warning | 1819 | cracklib: error loading dictionary
>  |
> > | Error   | 1819 | Your password does not satisfy the current policy
> requirements |
> > +-+--+--
> --+
>
> Well, it says that in attempt to validate the password, cracklib has
> failed with an error message "error loading dictionary".
>
> May be the dictionary file is missing. May be it is corrupted.
> Use SHOW VARIABLES LIKE 'cracklib_password_check_dictionary' to see the
> location of the cracklib dictionary.
>
> Regards,
> Sergei
> Chief Architect MariaDB
> and secur...@mariadb.org
>
___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp