On 1/18/21 2:08 PM, Martin Simmons wrote:
> Looks reasonable to me.  (*)
> 
> If the INSERT failed for some other reason then the original mysql_query()
> should have failed rather than mysql_affected_rows() returning 0.  I think if
> a subsequent SELECT returns a PathId then it would be safe to assume it is
> correct, regardless of any error in the INSERT.
> 
> (*) Except that there is the still an outstanding mystery about why this only
> seems to happen repeatably for you and I think someone asked for more
> debugging info about why you have concurrent updates to the db at all.


That's a good question to which I don't know the answer.

Perhaps I misunderstand some of the workings:  Does not each job running
in Bacula make its own updates to the Catalog?

If there is only one ... channel for DB updates, shall we say, i.e. only
a single thread executes ALL connections to the DB serially with only
one connection ever open at a time, then (a) I have a new understanding
of why things stall for so long at job end with caching enabled, and (b)
I'm newly mystified as to why this would be happening as well, since
there is in that case no chance of DB contention between threads, which
would seem to rpeclude race conditions between jobs, which was the only
reason I could think of as to why this would be happening.


It's POSSIBLE that I am the only person running Bacula against a Galera
cluster[1], and there is some non-obvious subtle behavioral difference
to which Bacula is sensitive.


[1]  Specifically MariaDB Galera Cluster, though I'd sooner be running
Percona XtraDB Cluster because it guarantees 100% compatibility with
community MySQL, which MariaDB doesn't and can't.  Unfortunately (1)
there is no Percona XtraDB Cluster package or ebuild for Gentoo Linux
(and Percona isn't interested in creating one), and (b) MariaDB is fast
becoming the default "MySQL" version installed on most Linux
distributions.

-- 
  Phil Stracchino
  Babylon Communications
  ph...@caerllewys.net
  p...@co.ordinate.org
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958


_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to