You are on page 1of 12

DB upgrade, Barracuda File Format

and Dynamic
Matthew Watkins
Account Escalations Row Format
Staff Engineer
22 Feb, 2018

Sapan Kumar Saha


Sr. Technical Support Engineer
Why do we Upgrade databases?
What happened?

2 © 2018 ServiceNow, Inc. All Rights Reserved. Confidential.


MySQL 8k Rowsize Limitation (Dynamic limit)
Syntax Error or Access Rule Violation detected by database (Row size too large (> 8126)

• What do we know?
– The 8k rowsize limitation can occur during an record insert, import set, update set or adding a column to a table.
– The error message displays on the console when encountered during data entry in a form.
– For a import, update set and insert of a column, the message can be found in the localhost logs.

• Examples of the types of errrors:

3 © 2018 ServiceNow, Inc. All Rights Reserved. Confidential.


MySQL 8k Rowsize Limitation
Syntax Error or Access Rule Violation detected by database (Row size too large (> 8126)

• More examples of the types of errors:

4 © 2018 ServiceNow, Inc. All Rights Reserved. Confidential.


MySQL 8k Rowsize Limitation
Syntax Error or Access Rule Violation detected by database (Row size too large (> 8126)

- Thenewer Innodb File Format of Barracuda was introduced which supported additional row formats of DYNAMIC and
COMPRESSSED.
(Tables with large BLOB or TEXT columns in particular would benefit from the dynamic row format)

- Prior to Barracuda file formats, there was only COMPACT and REDUNDANT.

- In the Antelope file format, 768 bytes of TEXT values are stored onrow and actually contribute to this limit.
-Tables declared with ROW_FORMAT=DYNAMIC doesn't have this 768-byte problem with TEXT columns.  All TEXT data is
stored fully offrow in Barracuda if the field holds more than 256 bytes.  Since we use a 3-byte UTF8 character set this means N must
be 86 or higher (256/3 = 85)

*Post DB upgrade it is still possible to hit the dynamic row limit, Simply widening the field’s that are less then Varchar(86) would
resolve the issue.

5 © 2018 ServiceNow, Inc. All Rights Reserved. Confidential.


What do we do now!
How do we approach the fix?

6 © 2018 ServiceNow, Inc. All Rights Reserved. Confidential.


What tells us that we need to use Barracuda?
Now, let’s check out the database’s health
- The case has been verified that the issue is an 8k rowsize
- Next steps are to verify that the database is in need of an upgrade

- Verify the database’s steps to Barracuda file formats


- Access the database server from your nearest friendly terminal
- Check the DB version, file format and row format

- What you will most likely find:


- The database will be a lower version than 10.2.21.
- The file format could display as Antelope, Barracuda
- The row format could display as DYNAMIC or not be accessible

7 © 2018 ServiceNow, Inc. All Rights Reserved. Confidential.


How to Upgrade DB:
There’s a catalog item.
Datacenter -> Service Catalog -> Databases -> Upgrade Database Version
The new procedure being introduced is the Datacenter Service Catalog item

- The catalog item must be submitted 3 hours prior to the change window time.
- Remember to inform customer that the database upgrade does require a 5-15 minute downtime as the AHA transfer
is performed to repoint the server node.
- What data is needed:
* The Instance name
* The new version of the database (currently, the version being chosen is 10.2.27snc2)

* Date/Time (confirm the timezone)


* Need to confirm from customer in the case, the change window that the customer
would like to have the database upgraded. (normally, run during off-hours )

8 © 2018 ServiceNow, Inc. All Rights Reserved. Confidential.


Contd.

- So how does it do it:


- Upgrade will be executed in this order:
Standby Upgrade -> AHA Transfer -> New Standby Upgrade ( old Primary)
- The catalog item will create 6 changes:

- Parent change

- Secondary database server node upgrade change.


(This upgrade will run 2 hours prior to the change window)
Standby STCD Change

- AHA Transfer change request


(This change occurs at the change window time)

- Primary database server node upgrade change.


(This upgrade will occur up to 48 hours after the change window)
Primary STCD Change

9 © 2018 ServiceNow, Inc. All Rights Reserved. Confidential.


Contd.

- So how does it do it:


- The Secondary database server node upgrade change

- This occurs 2 hours prior to the change window to allow for the AHA transfer to occur from the Primary
server during the change window time with minimal downtime.

- The AHA Transfer (repointing of the primary node) change request

- This occurs at the change window time and after the AHA transfer the Primary Server node becomes the
Secondary Server node and vice versa.
- The new Secondary server node will be upgraded within 48 hours.
- NOTE: In the subsequent change to rebuild the table, ensure that the database you are performing
the rebuild on is the primary server node.
- Perform a /replication.do to validate the DB Server

- The Primary database server node upgrade change (now, secondary server node)

10 © 2018 ServiceNow, Inc. All Rights Reserved. Confidential.


KB links
Helpful Knowledge Articles:

KB0780028 - Resolving MySql Rowsize limits (8126-byte error)

Documents for:
Limits on Table Column Count and Row Size
https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html
InnoDB Row Formats
https://dev.mysql.com/doc/refman/5.7/en/innodb-row-format.html
Antelope vs Barracuda:
https://bobcares.com/blog/your-database-has-tables-using-antelope-as-the-file-format/

11 © 2018 ServiceNow, Inc. All Rights Reserved. Confidential.


Thank You.
Let’s Roll!

12 © 2018 ServiceNow, Inc. All Rights Reserved. Confidential.

You might also like