你能更详细说说移除 DB_PRIVATE 会带来什么吗?
Can you provide more details about what removing DB_PRIVATE does?
我不记得当初用 DB_PRIVATE 是不是有特定理由,还是只是从示例代码里抄的标志。移除 DB_PRIVATE 能让其他进程安全地同时打开数据库吗?如果副作用可接受,那可能是个改进。它会不会因为必须立刻写出每次改动或做其他协调而大幅降低性能?那时会有额外的锁定或协调文件吗?还有什么会变?你可以通过给初始区块下载计时来测试有无 DB_PRIVATE 的差别,最好用 -connect 连接本地机器,排除网络因素。
I can't remember if I had a specific reason for DB_PRIVATE, or if I just copied the flags from some example code. Does removing DB_PRIVATE make it safe for other processes to open the database simultaneously? That may be an improvement, depending what the side effects are. Does it substantially reduce performance by making it have to write out every change immediately or do other coordination? Are there additional locking or coordination files then? What else changes? You could test by timing an initial block download with and without DB_PRIVATE, preferably -connect-ing to a local machine so network isn't a factor.
看来,DB_PRIVATE 并没有做到你期望它做的事,也就是阻止其他进程打开数据库。它照样允许访问,只是一旦其他进程真的打开数据库,就会出问题。如果有办法实现,另一种选择是锁定数据库文件,使其他进程无法访问。
Apparently, DB_PRIVATE doesn't do what you would hope it would do, which is prevent other processes from being able to open the database. It still lets them, it just screws up if they do. Another option, if there's a way, would be to make it lock the database files so they can't be accessed by other processes.
当前版本尚未建立逐条校对状态记录。来源核验、历史审校与当前译文校对是不同事项。
译文内容版本:16e7f120d52a。用于比对文本,不代表校对等级或更新时间。
请填写对应原文、现译文、建议译法和理由。复制后通过你联系本站作者的渠道提交;此处不会自动发送。