Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在运行耗时超过 10 秒的读写事务,并且它们正在超时(因ABORTED错误而失败)。有没有办法指定更长的超时时间?
ABORTED
无法指定事务的超时时间,但您有几个选项:
executeSql
SELECT 1
你应该考虑是否真的需要这么长的读写事务。读写事务使用可以阻止其他事务进行的锁和其他资源。对于这种长期存在的读写事务,这通常是一种反模式。