This repository was archived by the owner on May 8, 2026. It is now read-only.
Commit be78e64
feat: track batch size using serialized size of PublishRequest (#2113)
* feat: track batch size using serialized size of PublishRequest
* fix: compare against batchedBytes instead of messageSize in flush condition
* fix: also count static overhead in flow control
* fix: adjust thresholds in tests
* fix: clean up merge issue
* fix: revert use of topicNameSize in MessageFlowController
* fix: store topicNameSize as initialBatchedBytes in MessagesBatch
---------
Co-authored-by: Mike Prieto <michaelpri10@gmail.com>1 parent 6c67798 commit be78e64
2 files changed
Lines changed: 20 additions & 9 deletions
File tree
- google-cloud-pubsub/src
- main/java/com/google/cloud/pubsub/v1
- test/java/com/google/cloud/pubsub/v1
Lines changed: 16 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| 103 | + | |
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| |||
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
| 150 | + | |
| 151 | + | |
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
| |||
309 | 313 | | |
310 | 314 | | |
311 | 315 | | |
312 | | - | |
| 316 | + | |
313 | 317 | | |
314 | 318 | | |
315 | 319 | | |
| |||
636 | 640 | | |
637 | 641 | | |
638 | 642 | | |
639 | | - | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
640 | 646 | | |
641 | 647 | | |
642 | 648 | | |
| |||
1093 | 1099 | | |
1094 | 1100 | | |
1095 | 1101 | | |
| 1102 | + | |
1096 | 1103 | | |
1097 | 1104 | | |
1098 | 1105 | | |
1099 | 1106 | | |
1100 | | - | |
| 1107 | + | |
| 1108 | + | |
1101 | 1109 | | |
| 1110 | + | |
1102 | 1111 | | |
1103 | 1112 | | |
1104 | 1113 | | |
| |||
1111 | 1120 | | |
1112 | 1121 | | |
1113 | 1122 | | |
1114 | | - | |
| 1123 | + | |
1115 | 1124 | | |
1116 | 1125 | | |
1117 | 1126 | | |
| |||
1150 | 1159 | | |
1151 | 1160 | | |
1152 | 1161 | | |
1153 | | - | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
1154 | 1165 | | |
1155 | 1166 | | |
1156 | 1167 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
| 450 | + | |
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| |||
1150 | 1150 | | |
1151 | 1151 | | |
1152 | 1152 | | |
1153 | | - | |
| 1153 | + | |
1154 | 1154 | | |
1155 | 1155 | | |
1156 | 1156 | | |
| |||
1192 | 1192 | | |
1193 | 1193 | | |
1194 | 1194 | | |
1195 | | - | |
| 1195 | + | |
1196 | 1196 | | |
1197 | 1197 | | |
1198 | 1198 | | |
| |||
1238 | 1238 | | |
1239 | 1239 | | |
1240 | 1240 | | |
1241 | | - | |
| 1241 | + | |
1242 | 1242 | | |
1243 | 1243 | | |
1244 | 1244 | | |
| |||
0 commit comments