Hello Phil,

On 12/17/20 11:21 PM, Phil Stracchino wrote:

16-Dec 04:39 minbar-dir JobId 28076: Fatal error: sql_create.c:589
Create db Path record INSERT INTO Path (Path) VALUES
('/usr/src/linux-5.10.1-gentoo/include/linux/fsl/') failed.
ERR=Duplicate entry '/usr/src/linux-5.10.1-gentoo/include/linux/fsl/'
for key 'Path'
16-Dec 04:39 minbar-dir JobId 28076: Fatal error: catreq.c:664 attribute
create error. ERR=sql_create.c:589 Create db Path record INSERT INTO
Path (Path) VALUES ('/usr/src/linux-5.10.1-gentoo/include/linux/fsl/')
failed. ERR=Duplicate entry
'/usr/src/linux-5.10.1-gentoo/include/linux/fsl/' for key 'Path'


I'm going to guess maybe a race condition occurred between separate
threads where two jobs happened to try to write the same Path at the
same time.  This is a low-probability failure, but should we consider
doing an INSERT IGNORE or REPLACE INTO here?


This is a strange error, it would mean that you don't use the Batch insert mode

in your job, because we don't insert Path records one by one (Maybe in bscan

in some cases). With Batch sessions, you should not have duplicates.


Note that with MySQL, you can have a duplicate issue because the index is

based on the first 255 characters, and if your path is very long it might raise

an error like this (but I'm not sure if we have declared the index unique).


Best Regards,

Eric



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

Reply via email to