Unverified Commit 4ae3ae1f authored by Vihang Mehta's avatar Vihang Mehta Committed by Copybara
Browse files

Use concatMap after buffering

Summary: concatMap preserves order while mergeMap doesn't.

Test Plan:
Ran it with encryption/decryption logic that slows down table data
events. Made sure that the stats came after the table data.

Reviewers: michelle

Reviewed By: michelle

Differential Revision: https://phab.corp.pixielabs.ai/D9353

GitOrigin-RevId: 5fc17c4888470a9997ccd944823bc2cfb3e8ae46
parent ee743295
No related merge requests found
Showing with 2 additions and 2 deletions
+2 -2
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { import {
bufferTime, catchError, finalize, mergeMap, map, timeout, startWith, bufferTime, catchError, finalize, concatMap, map, timeout, startWith,
} from 'rxjs/operators'; } from 'rxjs/operators';
import { import {
ErrorDetails, ExecuteScriptRequest, HealthCheckRequest, QueryExecutionStats, Relation, ErrorDetails, ExecuteScriptRequest, HealthCheckRequest, QueryExecutionStats, Relation,
...@@ -253,7 +253,7 @@ export class VizierGRPCClient { ...@@ -253,7 +253,7 @@ export class VizierGRPCClient {
}).pipe( }).pipe(
finalize((() => { call.cancel(); })), finalize((() => { call.cancel(); })),
bufferTime(250), bufferTime(250),
mergeMap((resps: ExecuteScriptResponse[]) => { concatMap((resps: ExecuteScriptResponse[]) => {
const outs: ExecutionStateUpdate[] = []; const outs: ExecutionStateUpdate[] = [];
const dataBatch: BatchDataUpdate[] = []; const dataBatch: BatchDataUpdate[] = [];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment