我正在为 dynamodb 使用本地 docker 设置。我可以在项目较少时插入项目,当数据项目超过 1350 左右时,它开始出现错误。
table = dynamodb.create_table(
TableName='logevents',
KeySchema=[
{
'AttributeName': 'Id',
'KeyType': 'HASH' # Partition key
}
],
AttributeDefinitions=[
{
'AttributeName': 'Id',
'AttributeType': 'S'
}
],
ProvisionedThroughput={
'ReadCapacityUnits': 1,
'WriteCapacityUnits': 1
}
)
item = {
"log_datetime": "2019-08-04 16:16:24:302000",
"Action": "ApiCallFailed",
"intuit_tid": "f9d63462-51a6-463b-a19f-b5c6c7867388",
"PackageName": "com.intuit.billingcomm.billing.ius.facade.DefaultIUSServiceFacade.fetchAllGrants",
"FileName": "DefaultIUSServiceFacade.java",
"PID": "9",
"Processed_timestamp": "2019-09-05 18:17:06:515970",
"APIKey": "GetAllGrants",
"thread_id": "x1B35mhttps-jsse-nio-8443-exec-71\\x1B0;39m",
"LastMessage": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX is currently unavailable: status=500",
"Exceptions": [
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.MessageProcessingException",
"com.intuit.billingcomm.billing.exception.IAMTicketClientException",
"com.intuit.platform.integration.hats.common.XXXXXXXXXXXXXXXXX"
],
"Event": "XXXXXXXXXX",
"CategoryLevel1": "XXXXXXXXXXX",
"Domain": "IUS",
"LineNo": "128",
"CategoryLevel2": "TicketServerFailure"
}
for x in range(6000):
item['Id']=str(x)
table.put_item(
Item=item)
scan = table.scan(
ProjectionExpression='#k',
ExpressionAttributeNames={
'#k': 'Id'
}
)
print(str(len(scan['Items'])))
如果我给出范围 600,它会正确显示数据,但如果我给出 6000,它会显示没有项目 1332。有什么限制吗?