botocore BUG when using DAX client?

0

Hi, I am using the DAX Python client as below and I eventually use batch_write_item as below.

session = botocore.session.get_session()
dax_hook = amazondax.AmazonDaxClient(session, region_name="us-east-1", endpoints=[endpoint])

.
.
.

with concurrent.futures.ThreadPoolExecutor(
    max_workers=MAX_WORKERS
    ) as executor:
        for items_data_batch in items_data:
            executor.submit(write_batch, dax_hook, items_data_batch, ddb_table_name)

The write_batch function essentially tries to write to the cache (and eventually table) via dax_hook.batch_write_item(RequestItems={table_name: batch}). The issue I am facing is this succeeds most of the time but sometimes I get an exception as below. If I retry the batch, with high probability this works (out of 30M keys, 175 fail after this retry; most succeed on the first try). I am not sure, how do we interpret this Exception? I pulled some of the batches that failed and reran and this also worked (on first try), so I am thinking the ValidationException does not make sense (I have a few ideas about what might be the problem but I am not sure). Is this a possible bug in the Exception logic, and another Exception should be thrown?

The Exception I am getting looks like this:

ERROR - An error occurred (ValidationException) when calling the operation: Unknown parameter in RequestItems.some-table[0].PutRequest: "attr_names", must be one of: Item

已提問 2 年前檢視次數 294 次
1 個回答
0

Hi there,

In order to investigate this issue, could you please provide the following details:

  • DAX Python client version
  • DAX cluster ARN
  • timestamp of the errors
支援工程師
Peter_X
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南