Commit a02a535
committed
Compress ZooKeeper replication logs
Motivation:
When a file is newly created or has a large diff, the replication log
size can grow significantly. With compression, up to about 7–8 MB of
data can be stored in a single znode, improving replication performance.
Modifcations:
- Add `zstd-jni` dependency to the server module.
- Compress replication logs using zstd before storing them in ZooKeeper.
- Decompress replication logs when compressed prior to replay.
Result:
Central Dogma server now compresses replication logs with zstd.1 parent dd34da0 commit a02a535
3 files changed
Lines changed: 27 additions & 4 deletions
File tree
- server
- src/main/java/com/linecorp/centraldogma/server/internal/replication
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
465 | 466 | | |
466 | 467 | | |
467 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
468 | 473 | | |
469 | 474 | | |
470 | 475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
1029 | 1031 | | |
1030 | 1032 | | |
1031 | 1033 | | |
| 1034 | + | |
1032 | 1035 | | |
1033 | 1036 | | |
1034 | 1037 | | |
1035 | 1038 | | |
1036 | 1039 | | |
1037 | | - | |
| 1040 | + | |
1038 | 1041 | | |
1039 | 1042 | | |
1040 | 1043 | | |
1041 | 1044 | | |
1042 | 1045 | | |
1043 | 1046 | | |
| 1047 | + | |
| 1048 | + | |
1044 | 1049 | | |
1045 | 1050 | | |
1046 | 1051 | | |
| |||
1058 | 1063 | | |
1059 | 1064 | | |
1060 | 1065 | | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
1061 | 1071 | | |
1062 | 1072 | | |
1063 | 1073 | | |
| |||
1073 | 1083 | | |
1074 | 1084 | | |
1075 | 1085 | | |
| 1086 | + | |
1076 | 1087 | | |
1077 | 1088 | | |
1078 | 1089 | | |
1079 | 1090 | | |
1080 | 1091 | | |
1081 | 1092 | | |
1082 | 1093 | | |
1083 | | - | |
| 1094 | + | |
1084 | 1095 | | |
| 1096 | + | |
1085 | 1097 | | |
1086 | | - | |
| 1098 | + | |
| 1099 | + | |
1087 | 1100 | | |
1088 | 1101 | | |
1089 | 1102 | | |
| |||
1122 | 1135 | | |
1123 | 1136 | | |
1124 | 1137 | | |
1125 | | - | |
| 1138 | + | |
1126 | 1139 | | |
1127 | 1140 | | |
1128 | 1141 | | |
| |||
1132 | 1145 | | |
1133 | 1146 | | |
1134 | 1147 | | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
1135 | 1151 | | |
1136 | 1152 | | |
1137 | 1153 | | |
| |||
0 commit comments