You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: branches/pubsub-ordering-keys/google-cloud-clients/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/Publisher.java
+11-9Lines changed: 11 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -313,20 +313,22 @@ public void run() {
313
313
*/
314
314
publicvoidpublishAllOutstanding() {
315
315
messagesBatchLock.lock();
316
+
List<MessagesBatch> toSend;
316
317
try {
317
-
for (MessagesBatchbatch : messagesBatches.values()) {
318
-
if (!batch.isEmpty()) {
319
-
// TODO(kimkyung-goog): Do not release `messagesBatchLock` when publishing a batch. If
320
-
// it's released, the order of publishing cannot be guaranteed if `publish()` is called
321
-
// while this function is running. This locking mechanism needs to be improved if it
0 commit comments