aliyun / aliyun-tablestore-nodejs-sdk

Aliyun TableStore(原OTS) SDK for Node.js
Apache License 2.0
88 stars 33 forks source link

batchWriteRow不返回数据 #19

Closed gohopo closed 5 years ago

gohopo commented 6 years ago

下面是传入参数,加了按条件更新,期望返回错误 { "tables":[ { "tableName":"user", "rows":[ { "type":"UPDATE", "condition":{ "rowExistenceExpectation":"EXPECT_EXIST", "columnCondition":{ "sub_conditions":[ { "columnName":"password", "columnValue":"value", "comparator":1, "passIfMissing":true, "latestVersionOnly":true } ], "combinator":2 } }, "primaryKey":[ { "userId":"nihao1" } ], "attributeColumns":[ { "PUT":[ { "password":"yyyysss" } ] } ], "returnContent":{ "returnType":1 } } ] } ] } 但是返回结果是 { "tables": [], "RequestId": "000575fb-75ec-78a7-f500-d90b01f368f1" } 后来测试batchWriteRow里,不管加不加条件更新、执行成功失败,都是返回上面的数据. 所以batchWriteRow这个方法没有返回每个row的执行结果

其实我是想把原子操作increment封装到batchWriteRow, 因为官方不支持increment,所以用的条件更新 但是这个在高并发下容易失败,要加入重试, 可是现在batchWriteRow得不到error,请问我的操作有哪里不对吗 (要是官方支持increment最好)