Bareos 16.2.7 Mysql index

66 views
Skip to first unread message

George Kontostanos

unread,
Dec 29, 2017, 9:19:39 AM12/29/17
to bareos-users
Hello list,

I upgraded my Director to Bareos 16.2.7 via source. Now, when trying to create the suggested index from the release notes:

CREATE INDEX PathId_JobId_FileNameId_FileIndex ON File(PathId,_JobId, _FilenameId,_FileIndex);

I get the following error:

ERROR 1072 (42000): Key column '_JobId' doesn't exist in table

mysql> desc File;
+------------+----------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+----------------------+------+-----+---------+----------------+
| FileId | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
| FileIndex | int(10) unsigned | YES | | 0 | |
| JobId | int(10) unsigned | NO | MUL | NULL | |
| PathId | int(10) unsigned | NO | | NULL | |
| FilenameId | int(10) unsigned | NO | | NULL | |
| DeltaSeq | smallint(5) unsigned | YES | | 0 | |
| MarkId | int(10) unsigned | YES | | 0 | |
| LStat | tinyblob | NO | | NULL | |
| MD5 | tinyblob | YES | | NULL | |
+------------+----------------------+------+-----+---------+----------------+
9 rows in set (0.01 sec)

Any idea what I am doing wrong here?

Thanks

George

George Kontostanos

unread,
Dec 29, 2017, 10:46:03 AM12/29/17
to bareos-users

Hmmm, I believe the correct syntax is:

CREATE INDEX PathId_JobId_FileNameId_FileIndex ON File(PathId, JobId, FilenameId, FileIndex);

Jörg Steffens

unread,
Dec 29, 2017, 11:11:38 AM12/29/17
to bareos...@googlegroups.com
Yes, you are right. Unfortunately the process of creating HTML from a
Latex document do have some strange effects/errors, like adding an
underscore in same places.



--
Jörg Steffens joerg.s...@bareos.com
Bareos GmbH & Co. KG Phone: +49 221 630693-91
http://www.bareos.com Fax: +49 221 630693-10

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
Komplementär: Bareos Verwaltungs-GmbH
Geschäftsführer:
S. Dühr, M. Außendorf, Jörg Steffens, P. Storz

George Kontostanos

unread,
Dec 29, 2017, 11:45:51 AM12/29/17
to Jörg Steffens, bareos...@googlegroups.com
--
You received this message because you are subscribed to a topic in the Google Groups "bareos-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bareos-users/44lFovPMkJk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bareos-users...@googlegroups.com.
To post to this group, send email to bareos...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cheers :) 

I understand, lets see how long will it take to alter the table, considering that it is around 130GB!

Thanks

George
 
--
George Kontostanos
NetActuate, Inc
p: +1 919 727 9999 (ext 3021)

George Kontostanos

unread,
Dec 31, 2017, 7:24:25 AM12/31/17
to bareos-users
After 2 days of using 16.2.7 I had to revert back to 16.2.4.

But the problem apparently was with the index.

I was getting "mysql Waiting for table metadata lock" and no job was being processed.

After deleting the index things are back to normal.

Any idea why?

Thanks

George Kontostanos

unread,
Jan 2, 2018, 10:28:26 AM1/2/18
to bareos-users, joerg.s...@bareos.com
Hello again and happy new year!

I am really puzzled by the fact that adding a single INDEX would cause such a disaster. So, for 2 days no backups were able to complete. 

We had CPU and load average running very high on the database server, Percona 5.6 with SSD's in RAID1 and 92GB of RAM. The processlists were all waiting for table metadata lock. 

I would really appreciate some input here.

Thanks

George 

 
Reply all
Reply to author
Forward
0 new messages