@@ -49,6 +49,7 @@ public com.skyflow.vault.data.InsertResponse bulkInsert(InsertRequest insertRequ
4949 LogUtil .printInfoLog (InfoLogs .VALIDATE_INSERT_REQUEST .getLog ());
5050 Validations .validateInsertRequest (insertRequest );
5151 configureInsertConcurrencyAndBatchSize (insertRequest .getValues ().size ());
52+
5253 setBearerToken ();
5354 com .skyflow .generated .rest .resources .recordservice .requests .InsertRequest request = super .getBulkInsertRequestBody (insertRequest , super .getVaultConfig ());
5455
@@ -70,6 +71,7 @@ public CompletableFuture<com.skyflow.vault.data.InsertResponse> bulkInsertAsync(
7071 LogUtil .printInfoLog (InfoLogs .VALIDATE_INSERT_REQUEST .getLog ());
7172 Validations .validateInsertRequest (insertRequest );
7273 configureInsertConcurrencyAndBatchSize (insertRequest .getValues ().size ());
74+
7375 setBearerToken ();
7476 com .skyflow .generated .rest .resources .recordservice .requests .InsertRequest request = super .getBulkInsertRequestBody (insertRequest , super .getVaultConfig ());
7577 List <ErrorRecord > errorRecords = Collections .synchronizedList (new ArrayList <>());
@@ -306,6 +308,9 @@ private void configureInsertConcurrencyAndBatchSize(int totalRequests) {
306308 if (userProvidedBatchSize != null ) {
307309 try {
308310 int batchSize = Integer .parseInt (userProvidedBatchSize );
311+ if (batchSize > Constants .MAX_INSERT_BATCH_SIZE ) {
312+ LogUtil .printWarningLog (WarningLogs .BATCH_SIZE_EXCEEDS_MAX_LIMIT .getLog ());
313+ }
309314 int maxBatchSize = Math .min (batchSize , Constants .MAX_INSERT_BATCH_SIZE );
310315 if (maxBatchSize > 0 ) {
311316 this .insertBatchSize = maxBatchSize ;
@@ -326,7 +331,9 @@ private void configureInsertConcurrencyAndBatchSize(int totalRequests) {
326331 try {
327332 int concurrencyLimit = Integer .parseInt (userProvidedConcurrencyLimit );
328333 int maxConcurrencyLimit = Math .min (concurrencyLimit , Constants .MAX_INSERT_CONCURRENCY_LIMIT );
329-
334+ if (concurrencyLimit > Constants .MAX_INSERT_CONCURRENCY_LIMIT ) {
335+ LogUtil .printWarningLog (WarningLogs .CONCURRENCY_EXCEEDS_MAX_LIMIT .getLog ());
336+ }
330337 if (maxConcurrencyLimit > 0 ) {
331338 this .insertConcurrencyLimit = Math .min (maxConcurrencyLimit , maxConcurrencyNeeded );
332339 } else {
@@ -357,6 +364,9 @@ private void configureDetokenizeConcurrencyAndBatchSize(int totalRequests) {
357364 if (userProvidedBatchSize != null ) {
358365 try {
359366 int batchSize = Integer .parseInt (userProvidedBatchSize );
367+ if (batchSize > Constants .MAX_DETOKENIZE_BATCH_SIZE ) {
368+ LogUtil .printWarningLog (WarningLogs .BATCH_SIZE_EXCEEDS_MAX_LIMIT .getLog ());
369+ }
360370 int maxBatchSize = Math .min (batchSize , Constants .MAX_DETOKENIZE_BATCH_SIZE );
361371 if (maxBatchSize > 0 ) {
362372 this .detokenizeBatchSize = maxBatchSize ;
@@ -376,6 +386,9 @@ private void configureDetokenizeConcurrencyAndBatchSize(int totalRequests) {
376386 if (userProvidedConcurrencyLimit != null ) {
377387 try {
378388 int concurrencyLimit = Integer .parseInt (userProvidedConcurrencyLimit );
389+ if (concurrencyLimit > Constants .MAX_DETOKENIZE_CONCURRENCY_LIMIT ) {
390+ LogUtil .printWarningLog (WarningLogs .CONCURRENCY_EXCEEDS_MAX_LIMIT .getLog ());
391+ }
379392 int maxConcurrencyLimit = Math .min (concurrencyLimit , Constants .MAX_DETOKENIZE_CONCURRENCY_LIMIT );
380393
381394 if (maxConcurrencyLimit > 0 ) {
0 commit comments