Slice Split Example for MariaDB Xpand

Overview

MariaDB Xpand's Rebalancer automatically splits a slice when it has grown larger than rebalancer_split_threshold_kb (8 GB by default).

Compatibility

Information provided here applies to:

  • MariaDB Xpand 5.3

  • MariaDB Xpand 6.0

  • MariaDB Xpand 6.1

Beginning State

Xpand - Reslicing (Before)

Slice

Hash Range

Key Values

Size

1

min-100

A, D, G

768 MB

2

101-200

B, E, I, J, K

8354 MB (too large)

3

201-max

C, F, H

800 MB

At the start of this example, a slice has grown larger than rebalancer_split_threshold_kb (8 GB by default).

Slice Split

Xpand - Reslicing (Before)

Slice

Hash Range

Key Values

Size

1

min-100

A, D, G

768 MB

3

201-max

C, F, H

800 MB

4

101-150

B, E

4670 MB

5

151-200

I, J, K

4684 MB

MariaDB Xpand's Rebalancer automatically detects that the split threshold has been exceeded, so it schedules a slice-split operation:

  • During the slice-split operation, the hash range for slice 2 is divided into two ranges, which are associated with two new slices called slice 4 and slice 5

  • After the data is moved to slice 4 and slice 5, slice 2 is removed

  • The Rebalancer only modifies the slices being split, which allows for very large data reorganizations to proceed in small chunks