@@ -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,12 +308,11 @@ private void configureInsertConcurrencyAndBatchSize(int totalRequests) {
306308 if (userProvidedBatchSize != null ) {
307309 try {
308310 int batchSize = Integer .parseInt (userProvidedBatchSize );
309- if (batchSize > Constants .MAX_DETOKENIZE_BATCH_SIZE ) {
311+ if (batchSize > Constants .MAX_INSERT_BATCH_SIZE ) {
310312 LogUtil .printWarningLog (WarningLogs .BATCH_SIZE_EXCEEDS_MAX_LIMIT .getLog ());
311313 }
312314 int maxBatchSize = Math .min (batchSize , Constants .MAX_INSERT_BATCH_SIZE );
313315 if (maxBatchSize > 0 ) {
314- // LogUtil.printInfoLog(InfoLogs.SET_BATCH_SIZE.getLog() + maxBatchSize);
315316 this .insertBatchSize = maxBatchSize ;
316317 } else {
317318 LogUtil .printWarningLog (WarningLogs .INVALID_BATCH_SIZE_PROVIDED .getLog ());
@@ -330,11 +331,10 @@ private void configureInsertConcurrencyAndBatchSize(int totalRequests) {
330331 try {
331332 int concurrencyLimit = Integer .parseInt (userProvidedConcurrencyLimit );
332333 int maxConcurrencyLimit = Math .min (concurrencyLimit , Constants .MAX_INSERT_CONCURRENCY_LIMIT );
333- if (concurrencyLimit > Constants .MAX_DETOKENIZE_CONCURRENCY_LIMIT ) {
334+ if (concurrencyLimit > Constants .MAX_INSERT_CONCURRENCY_LIMIT ) {
334335 LogUtil .printWarningLog (WarningLogs .CONCURRENCY_EXCEEDS_MAX_LIMIT .getLog ());
335336 }
336337 if (maxConcurrencyLimit > 0 ) {
337- // LogUtil.printInfoLog(InfoLogs.SET_CONCURRENCY_LIMIT.getLog() + maxConcurrencyLimit);
338338 this .insertConcurrencyLimit = Math .min (maxConcurrencyLimit , maxConcurrencyNeeded );
339339 } else {
340340 LogUtil .printWarningLog (WarningLogs .INVALID_CONCURRENCY_LIMIT_PROVIDED .getLog ());
@@ -369,7 +369,6 @@ private void configureDetokenizeConcurrencyAndBatchSize(int totalRequests) {
369369 }
370370 int maxBatchSize = Math .min (batchSize , Constants .MAX_DETOKENIZE_BATCH_SIZE );
371371 if (maxBatchSize > 0 ) {
372- // LogUtil.printInfoLog(InfoLogs.SET_BATCH_SIZE.getLog() + maxBatchSize);
373372 this .detokenizeBatchSize = maxBatchSize ;
374373 } else {
375374 LogUtil .printWarningLog (WarningLogs .INVALID_BATCH_SIZE_PROVIDED .getLog ());
@@ -393,7 +392,6 @@ private void configureDetokenizeConcurrencyAndBatchSize(int totalRequests) {
393392 int maxConcurrencyLimit = Math .min (concurrencyLimit , Constants .MAX_DETOKENIZE_CONCURRENCY_LIMIT );
394393
395394 if (maxConcurrencyLimit > 0 ) {
396- // LogUtil.printInfoLog(InfoLogs.SET_CONCURRENCY_LIMIT.getLog() + maxConcurrencyLimit);
397395 this .detokenizeConcurrencyLimit = Math .min (maxConcurrencyLimit , maxConcurrencyNeeded );
398396 } else {
399397 LogUtil .printWarningLog (WarningLogs .INVALID_CONCURRENCY_LIMIT_PROVIDED .getLog ());
0 commit comments