我目前正在使用 mongobee 来更新 mongoDB 数据库。更新可能需要几分钟,但似乎 mongobee 本身的实际行为仅持续几秒钟,之后 java 进程会在关闭前停留几分钟。
2020-10-13 17:32:53.791 INFO 1 --- [mongo] o.m.d.cluster : Setting max set version to 4 from replica set primary XXXXXXXXX
2020-10-13 17:32:53.791 INFO 1 --- [mongo] o.m.d.cluster : Discovered replica set primary XXXXXXXXX
2020-10-13 17:32:54.889 INFO 1 --- [imer-1-thread-1] o.m.d.connection : Opened connection [connectionId{localValue:1, serverValue:18352}] to XXXXXXXXX
2020-10-13 17:32:55.191 INFO 1 --- [ main] c.g.m.Mongobee : Mongobee acquired process lock, starting the data migration sequence..
2020-10-13 17:32:55.508 INFO 1 --- [ main] o.r.Reflections : Reflections took 200 ms to scan 1 urls, producing 1 keys and 1 values
2020-10-13 17:32:55.691 INFO 1 --- [ main] c.g.m.Mongobee : Mongobee is releasing process lock.
2020-10-13 17:32:55.698 INFO 1 --- [ main] c.g.m.Mongobee : Mongobee has finished his job.
2020-10-13T17:35:37,089 TECHNICAL INFO myapplication {o.s.b.StartupInfoLogger} Started MyApplication in 28.81 seconds (JVM running for 36.744)
之后,java 进程仍然工作几分钟,然后结束,没有任何进一步的日志。
根据日志,Mongobee 在 17:35:37 完成了他的工作,所以我不明白为什么我在它停止之前被卡住了大约 5 分钟。
这是预期的行为吗?springboot/mongobee 是否有一个参数,比如在离开连接之前要遵守的“会话空闲时间”?