File tree 1 file changed +8
-1
lines changed
packages/wrangler/src/vectorize
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ import type {
10
10
StrictYargsOptionsToInterface ,
11
11
} from "../yargs-types" ;
12
12
13
- const VECTORIZE_UPSERT_BATCH_SIZE = 5_000 ;
13
+ const VECTORIZE_MAX_BATCH_SIZE = 1_000 ;
14
+ const VECTORIZE_UPSERT_BATCH_SIZE = VECTORIZE_MAX_BATCH_SIZE ;
14
15
const VECTORIZE_MAX_UPSERT_VECTOR_RECORDS = 100_000 ;
15
16
16
17
export function options ( yargs : CommonYargsArgv ) {
@@ -48,6 +49,12 @@ export async function handler(
48
49
const config = readConfig ( args . config , args ) ;
49
50
const rl = createInterface ( { input : createReadStream ( args . file ) } ) ;
50
51
52
+ if ( Number ( args . batchSize ) > VECTORIZE_MAX_BATCH_SIZE ) {
53
+ logger . error (
54
+ `🚨 Vectorize currently limits upload batches to ${ VECTORIZE_MAX_BATCH_SIZE } records at a time.`
55
+ ) ;
56
+ }
57
+
51
58
let vectorInsertCount = 0 ;
52
59
for await ( const batch of getBatchFromFile ( rl , args . batchSize ) ) {
53
60
const formData = new FormData ( ) ;
You can’t perform that action at this time.
0 commit comments