我正在使用 DynamoDB。我从应用程序进行扫描操作。一切都很完美。一段时间后,响应为零。但我没有收到任何例外。我启用了详细日志记录,
[AmazonLogger verboseLogging];
如果启用了详细日志记录,我可以看到一些日志,例如,
"__type":"com.amazonaws.dynamodb.v20111205#ProvisionedThroughputExceededException","message":"超出了为表配置的预置吞吐量级别。考虑使用 UpdateTable API 提高预置级别"
我的代码看起来像这样,
@try {
DynamoDBScanRequest *request = /* Create request */;
DynamoDBScanResponse *response = [[AmazonClientManager ddb] scan:request];
/*
* response is nil if the provisioning throughput is exceeded
* and the all retries are over
*/
ALog(@"Response: %@", response);
NSMutableArray *array = response.items;
return array;
} @catch (NSException *exception) {
/*
* I am expecting the ProvisionedThroughputExceededException
* to be thrown here. But its not throwing here. Instead I get the response
* as nil above.
*/
ALog(@"Exception: %@", exception);
return nil;
}
我做对了吗?有人可以帮我吗?
谢谢。
编辑:谁能给我一个粗略的想法,即为 QuestionAnswer 表设置多少吞吐量(读/写)容量,其中有近 10 个字段,如 TopicID、QuestionID、Question、Answer、AskedAt、RepliedAt、QuestionType 等?谢谢。