我习惯使用git,这是我第一次遇到这个我不明白的错误。
在 Linux 上进行全新克隆后
# git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
Run Code Online (Sandbox Code Playgroud)
即使我知道所有内容都已更新:
# git pull
error: preserve: 'preserve' superseded by 'merges'
fatal: invalid value for 'pull.rebase': 'preserve'
#
# git --version
git version 2.37.1
#
Run Code Online (Sandbox Code Playgroud)
为什么这个 ?
许多客户端在 sqlite 数据库上查询时的众所周知的问题:数据库被锁定
我想增加在 Linux 上等待锁定释放的延迟(以毫秒为单位),以消除此错误。
从 sqlite-command 中,我可以使用例如(4 秒):
sqlite> .timeout 4000
sqlite>
Run Code Online (Sandbox Code Playgroud)
我已经启动了许多进行选择/插入/删除的进程,如果我不使用 sqlite-command 设置此值,我有时会得到:
sqlite> select * from items where code like '%30';
Error: database is locked
sqlite>
Run Code Online (Sandbox Code Playgroud)
那么 .timeout 的默认值是多少?
在 Perl 5.10 程序中,我有时也会遇到此错误,尽管默认值似乎是 30.000(所以 30 秒,未记录)。
程序在出现此错误之前实际上等待了 30 秒吗?如果是,这看起来很疯狂,即使该数据库上正在运行许多其他进程,数据库至少有一段时间是空闲的
my $dbh = DBI->connect($database,"","") or die "cannot connect $DBI::errstr";
my $to = $dbh->sqlite_busy_timeout(); # $to get the value 30000
Run Code Online (Sandbox Code Playgroud)
谢谢!