跳至內容
選單
此問題已被標幟
1 回覆
1865 瀏覽次數

When I use multi-threaded concurrent submissions account.move action_post ,I got an error :Due to inability to access serial synchronization updates,After my investigation, I found that it is not possible to generate the last_sequence。

how i can do


頭像
捨棄
作者 最佳答案
# Unable  to  generate serial numbers concurrently 

class SequenceMixin()
    def _get_last_sequence(self, relaxed=False, with_prefix=None):	​...​
query = """
​UPDATE {table} SET write_date = write_date WHERE id = (
​SELECT id FROM {table}
​{where_string}
​AND sequence_prefix = (SELECT sequence_prefix FROM {table} {where_string} ORDER BY id DESC LIMIT 1)
​ORDER BY sequence_number DESC
​LIMIT 1
​)
​​RETURNING {field};
​""".format(
​table=self._table,
​where_string=where_string,
​field=self._sequence_field,
​)

...





頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
9月 24
1704
2
3月 24
3488
2
2月 23
4085
6
10月 20
38525
1
9月 20
4662