Repository: p2panda/aquadoggo (language: rust)

Issue:
Critical error in dependency worker task
This occurred when performing initial replication using mDNS with 3 other pre-populated peers on the same device.

```
[2023-07-24T12:54:58Z INFO  aquadoggo::replication::service] Finished replication with peer 12D3KooWLxJGEeXis87qwn2Z1q5du41eQJhtJbt2SGrzBi1YcRvc (7)
[2023-07-24T12:54:58Z INFO  aquadoggo::materializer::tasks::reduce] Created <Document 8a2a31>
[2023-07-24T12:54:58Z INFO  aquadoggo::materializer::tasks::reduce] Created <Document 3fd16e>
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 9987 w. <TaskInput -/0020b7f7ab7125dae15ebfcb8577883677c011458c6285e493973943c82aaf303a45>>: Expected document with view 0020b7f7ab7125dae15ebfcb8577883677c011458c6285e493973943c82aaf303a45 not found in store
[2023-07-24T12:54:58Z INFO  aquadoggo::manager] Received shutdown signal
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10027 w. <TaskInput -/0020c91317bff7fbd93018ab5b0f5caf7e8ac9652524cb6f5de46c80d40e8df41fab>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10033 w. <TaskInput -/0020ccc6d43e4b8812d5ec4d13c5a7500decfc4e8928552ea9c3c5e5891b21493c8c>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
thread 'tokio-runtime-worker[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10034 w. <TaskInput -/0020cea875c0a26121faa6938513d79787484f400bd62725d163f4d73f9efa2b5aef>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10031 w. <TaskInput -/0020cbb110fd1e0d77688116a3520f1ba99d9282a2e1ac6462b701b29ace76f697d1>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10035 w. <TaskInput -/0020d0145b52c85156af988ec5862baee339f888042602defa877a9c87f3159d3c96>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
' panicked at '[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10036 w. <TaskInput -/0020d078d84809e5cc6441dbe3c3310badf93b2328eaa8ee7d5779309e26542b58bf>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
Fatal database error: Custom("attempted to acquire a connection on a closed pool")', /home/sandreae/Code/aquadoggo/aquadoggo/src/replication/ingest.rs:[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10039 w. <TaskInput -/0020d1872f29536b1b613d397001e7f653bed141b64b2a270c0d85ca344aaae0b176>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
44:14[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10040 w. <TaskInput -/0020d18c1d0e87164502ffe43b3082e54f3e098d865220c3107d8aaff92b64637049>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10037 w. <TaskInput -/0020cfb5d5363d66b2e76cbcea369569b5a9a4841412c52f942c2b441e53ea4008a5>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10041 w. <TaskInput -/0020d273491dfded58d673e2910bfad4a10bb8aa384a53aec3527c796ae8f594e5c4>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10042 w. <TaskInput -/0020d0d5374cb465aec9e15f4b4eecae3e4a5e7995691763541ae971ea6cbc8d5c84>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10043 w. <TaskInput -/0020d3b252b7e095bb356cfc3c843a9a0c90036632341003bb8aa4ba17212d3ee85f>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10044 w. <TaskInput -/0020d43e0c5d254db6997f80d1807fc233d664d1e2a8d4d0086d9c30b739902af613>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10045 w. <TaskInput -/0020d4bf9e82c5a0168beec422d912e5a19df3f80cb22ade943668601e3eda5630df>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10046 w. <TaskInput -/0020d4cad3bbb3a8e23af702645e9b889029c47343978653d28fe9929e558cdf1a17>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10047 w. <TaskInput -/0020d4e22717924b08aa7aa3e1438a1e19cc1a417d1860584c6e8069e2bfea828af4>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10048 w. <TaskInput -/0020d52b5ad7641c9ddb17f42d57213aa546d952efbe41727361cf0f0de7c4375470>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10049 w. <TaskInput -/0020d53f02800fb3748e755c98cc7d828f986c97676b20afa5076bb1f25c31cc0e4d>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10050 w. <TaskInput -/0020d6973a775c813d8655e0a71544ec63c0ccd099e49f22734e219d8534bf060fbb>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10051 w. <TaskInput -/0020d6a4d8ec5a3254634d9527168893b258824f53c540c55ad50b86a50753690f71>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10052 w. <TaskInput -/0020d70a3c23307903f49e0e385e4d565a0d5667f04ce972937c9abfd0cb0d070447>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10053 w. <TaskInput -/0020d7a9b4d46f2be2806bd9a73a4082a2a07447fcc30910870813a1956ecedce420>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10038 w. <TaskInput -/0020d0b847fdca18136481badb0f1437221cd85f4ea914d324801fd4de81c9469e34>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10054 w. <TaskInput -/0020d8009654ba1a169720467b305a359cb20cd12b3ad6e10916fae6412cd71e0e03>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10056 w. <TaskInput -/0020d9e86d18034f04a6ed1bb7e393d024155c5d20dfc20bab9be4a7968b29809915>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10055 w. <TaskInput -/0020d99a764b79a968abdd29dc5fc4bfd9c3949ac9e19bb789da353a3c0bf4ef396b>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10058 w. <TaskInput -/0020da905f80bdd0875d328a4440265269bb2055bdde5c2c5b5dc89f1be3e8720a0f>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10059 w. <TaskInput -/0020dae0a2b414d3061002626a3340e59f3fb8ada475b096c67303ec05f5df86928f>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10060 w. <TaskInput -/0020db1e924ef42ee6f625fa52b1aa0d63e29c3ba67da295dce92bc7d1b97c7918f3>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10061 w. <TaskInput -/0020dbb22a0a27a847fbfd4bf2c84372bd9d1546261a387212921ecb9e21ecebdbd6>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10062 w. <TaskInput -/0020dd10881874b4127984d2b7eebbfbaddf4f020a553c47829b7331e270dea44d25>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10063 w. <TaskInput -/0020dd589c656888179b66a6b7938abd1c82fde200372fe87644b15decbfad205e19>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10064 w. <TaskInput -/0020ddea48e778911a7ced70abfe7dc5860a7d83cafda3a4b096a2ebeb3d151be827>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10065 w. <TaskInput -/0020ddef0bde7d2ba78453f4112aa416c3b372a9c56c9b68c9ffc010130e2254870c>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10066 w. <TaskInput -/0020de400bd23cefcf91e38d146c96b1e2adf01676fdac1e33258059cea76e4decac>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10068 w. <TaskInput -/0020df033f8e353b105edbc0a8f8112f178243a0dc18285635fdc47b6636f30aee3d>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10067 w. <TaskInput -/0020dedd3e24555616d5d6e9466de843b84b02928d987eacd3136f55de6233642749>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10069 w. <TaskInput -/0020df0efb412c801dfdd8928b3b87507e15670e706b820fdb66ce37d8a142e31348>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10070 w. <TaskInput -/0020df3cc27a5494490ab7e537848c94e342814beec684946221002d34c16ae119b4>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10071 w. <TaskInput -/0020dff357e039b0f616a7509b0c0af345007b39e685151c089296af1bd8ba93dbe2>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10073 w. <TaskInput -/0020e1ed2f823c9b3b47018336e987dac32e9ba0f666e51c21bd96e2acce28856f0f>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10072 w. <TaskInput -/0020e0844c24963aba640c008caa5279d30b0f18929b8c2f1dd5df3bd075a03b94c4>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10074 w. <TaskInput -/0020e1f0411432057e2d6b9c8dd9ca82773b580913e01acd7170d8845068669bb068>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10075 w. <TaskInput -/0020e21c773d97e3fe072d85e329792445486614c11f6b203754d40b5245ff34197d>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10076 w. <TaskInput -/0020e24d30d4aafc312c8cb6adbca1873d8c8542c19bd2d0eef0ffb9135d89068ed6>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10078 w. <TaskInput -/0020e35341a1652171c6465ae44c697f9ecae5e30c803ccce8948946b37b2ae076e2>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10077 w. <TaskInput -/0020e25883d0aaf895bda3cd58828e982a17c172459c18cfce1293741909614c7240>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10079 w. <TaskInput -/0020e3aefd6b317ba14d23b8897875c37ae48ab4c2c44f99aba70658e49c4eda6f42>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10080 w. <TaskInput -/0020e3d3cc69fdec69ac7090cc9eba5a3e250a951fa4c63cfe0c8bbabce16cab4d8f>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10081 w. <TaskInput -/0020e400db9a02a7c413d66f7ce1b1666ba2ade6c118508d2e799bb89fc00340e8c8>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10083 w. <TaskInput -/0020e459c48a107e09963ec8bf52e167d73f8cb4281c509656d3ff1e25308bb55243>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10082 w. <TaskInput -/0020e436c7d4820c8e27339410f7bd4fe802f557e984fddaeac4b75b5667cd700c45>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10085 w. <TaskInput -/0020e46e2f166da82caa202181fc1cae74cb690c3690fd512db6bf0aa70f9a3da43b>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10084 w. <TaskInput -/0020e4601d52a36dd712ae71b9cdb3f1dd7bf3758d8dc77f2b027a247b14697f3198>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10086 w. <TaskInput -/0020e4a8afe8558b75a485fbb1dd605e200223bdbd9e7a41d0caf13bc14df93ec618>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10087 w. <TaskInput -/0020e5884020708b428ac02ca3794eb02a6fc3658c901fdc8fe2d8565ca64219edb0>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10088 w. <TaskInput -/0020e65e1742d6f04e589e1c863cfa215539cc9b3ea8a116c392718b8212a1cb2552>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10090 w. <TaskInput -/0020e6f4c6d1065403793ec17863a949cea3ca5d24819f5d86c720cac48dcd76cf10>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10089 w. <TaskInput -/0020e69ef4d862974f602bdf49257874acc740011c60b95eec681581d7e70694000c>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10030 w. <TaskInput -/0020cb6b8b19f61a2d066f4120440e6cf945ec9af384f93b950853a968182dd2ef72>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10092 w. <TaskInput -/0020e80bf787622bcf096b913ff7fee534b93c2636f58a869ae1a9b57d54b5c99342>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10091 w. <TaskInput -/0020e71733f32c3aa73ce5df14327b14acad86507860dc1d7ece5d28d64017298ae8>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10093 w. <TaskInput -/0020e822c9212e0de8e2e4ede2d08fb425c08a2eaf67f7cdba10341492e2ee7d443a>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10095 w. <TaskInput -/0020e889b5ec3218d330f4a7d632b8d182fb8f78774f51e59e5909c0540c6e387386>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10094 w. <TaskInput -/0020e84fc827433d41e82a30e613de0f78f1ab374a997e571fb91faf144c118069c3>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10096 w. <TaskInput -/0020e9ad06b103e6241a2f99a21578f0a87b075ce5a3504f384062db57d5752a4251>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10097 w. <TaskInput -/0020e9c0632ea01aa2e1f473cea81c2bff3d1f80d054fae057808c686ba092743870>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10098 w. <TaskInput -/0020ea250f5841ddbdbfb4528c19f43e0542fab21de1c24271f426e41f14a120cd57>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10099 w. <TaskInput -/0020ea29b84f03d71d68fe1de915b946724a5d13ea5918a07713fa08dd6aa09724fe>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10057 w. <TaskInput -/0020da0211daf1b7d9da0f88359b40735c2dee94edc41f1f4112aa8e5a273e0ba7b4>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10100 w. <TaskInput -/0020ea2f8ebbdcb321dadaa12e27a3187ae05268964ef82a0c5c35faf941f89af694>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10102 w. <TaskInput -/0020eaf97520e6620c84d5e85cfa5d9ace895994c2f3ec0874f296e0433b4ef46e98>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10101 w. <TaskInput -/0020eaf37daf8fbfe4e487b1a1ec149b7ebd1fd57d9dd2c2d6a5739b0bbce6ca089b>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10103 w. <TaskInput -/0020eba730fa47695d0f6ceaaf9801a5813bbe14acd4ea107b8e40e8ed6a46d6de85>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10106 w. <TaskInput -/0020fe20f945f633cfa7ebb99774353519390461b3630d6eb42a3c49596c6e6c087e>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10105 w. <TaskInput -/0020fd4886e036007b5ab1a905ed303c4e4221eaa9452b12cbcb80ad12c404105735>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
thread 'tokio-runtime-worker' panicked at 'Failed inserting pending task into database: Transaction("attempted to acquire a connection on a closed pool")', /home/sandreae/Code/aquadoggo/aquadoggo/src/materializer/service.rs:58:26
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10107 w. <TaskInput -/0020fe5cec0328f8808dddbbbadbc6aa6b0d56e5fca7ce6425de667db05a204cb548>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10104 w. <TaskInput -/0020fd2b8da31fc669449ee8879eb8f3a637e4fcc737fb7b818a07476dfd54c718ab>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10109 w. <TaskInput -/0020fe2fbba5bc88162b91d7b196675b47edfd9d3ba77c392d1ff5da0dd158aaa808>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10108 w. <TaskInput -/0020fef1366dc32f1bd5ff291af0ee782aa4fff1eddbcadb3365f881e284c9364bdc>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10023 w. <TaskInput -/0020c7a5afa293019e9331510c58b99e25653bd742ed53eead9df4b37a319cd576fd>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 8415 w. <TaskInput -/0020eb07e6fc45776c7239880272040e0d5b3135cf56637a71d3012ad28f37bfef0d>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10112 w. <TaskInput -/0020ff78d37d79bf205afaa3b66e0d4eceddf42e8afcd9777044fada2494d34a0005>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10110 w. <TaskInput -/0020ff3cfa3883c18a47b9ad17c6732df49965576bf6a5bd18259af6ca12d55192f4>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10111 w. <TaskInput -/0020ff3d7d9671179c0dd5af51601e39df0767c715272e47357786627f2f0a954965>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10114 w. <TaskInput -/0020ff9b2684efc726932882b892b93f0a757e47073baca762054bd66f9d193fd16e>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10113 w. <TaskInput -/0020ff865cb65bd272ac7f7d13c0bf56d308305facf0419f3c612ba5b50aaf8a2a31>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10021 w. <TaskInput -/0020c720ebac758f577c160cfd7a7d6e360143da1afcda27068aef5aab232335d930>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10024 w. <TaskInput -/0020c7adab7ef8eebb0b9d7c06465c8ef87b0d5d53985c05933d331eeae4602d61f2>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10028 w. <TaskInput -/0020ca0f9aca096ba3ef4c60e9bcf3fc69851be125522987659be0cce94a8584a53b>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10020 w. <TaskInput -/0020c68c3b99706088c9b4198199862702fcb2ccfa3ae1be8364073a16527c38d8f7>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10032 w. <TaskInput -/0020cbf35408e5db6f09d4ba5eacfb9cb01a353bfbb0e0ec528bd99fd56e0dc49034>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10029 w. <TaskInput -/0020ca8c3a3f1946e522c13b878ab0307f8c9bbba91eaeb5134df98dd47b76606e0d>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 10026 w. <TaskInput -/0020c885884fe934de5d49c4f19e8dd4b85fe49f212aeac6ad6fb9d57de9694e0aae>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
[2023-07-24T12:54:58Z ERROR aquadoggo::materializer::worker] Critical error in worker dependency with task <QueueItem 8624 w. <TaskInput -/0020ee5eb56043e5e1443018c22d58e7cc8e4533b3c9acd1d632734b153fc3ac3874>>: A fatal error occured in DocumentStore: attempted to acquire a connection on a closed pool
```


Discussion / hints:

Fix patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eeea6bd9d..46eea9fae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -72,6 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - Fix race condition when check for existing view ids was too early [#420](https://github.com/p2panda/aquadoggo/pull/420)
 - Use fork of `asynchronous-codec` to temporarily fix CBOR decoding bug [#440](https://github.com/p2panda/aquadoggo/pull/440)
 - Fix composing of circuit relay address [#451](https://github.com/p2panda/aquadoggo/pull/451)
+- Do not critically fail when view does not exist due to race condition [#460](https://github.com/p2panda/aquadoggo/pull/460)
 
 ### Open Sauce
 
diff --git a/aquadoggo/src/materializer/tasks/dependency.rs b/aquadoggo/src/materializer/tasks/dependency.rs
index c3f0eaf85..699cdf05e 100644
--- a/aquadoggo/src/materializer/tasks/dependency.rs
+++ b/aquadoggo/src/materializer/tasks/dependency.rs
@@ -49,9 +49,10 @@ pub async fn dependency_task(context: Context, input: TaskInput) -> TaskResult<T
         }
         // If no document with the view for the id passed into this task could be retrieved then
         // this document has been deleted or the document view does not exist. As "dependency"
-        // tasks are only dispatched after a successful "reduce" task, neither `None` case should
-        // happen, so this is a critical error.
-        None => Err(TaskError::Critical(format!(
+        // tasks are only dispatched after a successful "reduce" task this is fairly rare, usually
+        // a result of a race condition where other tasks changed the state before the "dependency"
+        // task got dispatched.
+        None => Err(TaskError::Failure(format!(
             "Expected document with view {} not found in store",
             view_id
         ))),


Test patch: