File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
packages/db-client/src/streams/appendToStream Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 11import { StreamsService } from "../../../generated/streams_grpc_pb" ;
2-
2+ import { StreamsServiceService } from "../../../generated/streams.v2_grpc_pb" ;
33import { Client } from "../../Client" ;
44import { ANY } from "../../constants" ;
55import type {
@@ -11,6 +11,7 @@ import type {
1111 MultiAppendResult ,
1212 AppendStreamRequest ,
1313} from "../../types" ;
14+ import { UnsupportedError } from "../../utils" ;
1415
1516import { append } from "./append" ;
1617import { batchAppend } from "./batchAppend" ;
@@ -87,5 +88,9 @@ Client.prototype.multiAppend = async function (
8788 requests : AppendStreamRequest [ ] ,
8889 baseOptions : BaseOptions = { }
8990) : Promise < MultiAppendResult > {
91+
92+ if ( ! ( await this . supports ( StreamsServiceService . multiStreamAppendSession , "all" ) ) ) {
93+ throw new UnsupportedError ( "multiStreamAppend" , "25.10" ) ;
94+ }
9095 return multiAppend . call ( this , requests , baseOptions ) ;
9196} ;
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ export const multiAppend = async function (
2222 "multiStreamAppend" ,
2323 ( client ) =>
2424 new Promise < MultiAppendResult > ( async ( resolve , reject ) => {
25+ baseOptions . requiresLeader = false ;
2526 const sink = client . multiStreamAppendSession (
2627 ...this . callArguments ( baseOptions ) ,
2728 ( error , response ) => {
You can’t perform that action at this time.
0 commit comments