I came across a bug in a specific MongoDB version (5.0.8), in which if the flag_data field of flag collection is indexed like it is done by create_index function (see mongo_utils.py), then it raises DuplicateKeyError, even if the flag body is different. Maybe it performs some special check on flag characters. An immediate solution is to leave create_index as stub, or to set the index as not unique (anyway, probability of collision is very very low). The impact of this bug is that this loop: https://github.com/Shotokhan/ad_kihon/blob/4bec3c89bdcc9bc055882b1be9dfc6e75557564f/src/check_scheduler.py#L100-L107 is run forever, so the checkers' system completely hangs.
I came across a bug in a specific MongoDB version (5.0.8), in which if the flag_data field of flag collection is indexed like it is done by create_index function (see mongo_utils.py), then it raises DuplicateKeyError, even if the flag body is different. Maybe it performs some special check on flag characters. An immediate solution is to leave create_index as stub, or to set the index as not unique (anyway, probability of collision is very very low). The impact of this bug is that this loop: https://github.com/Shotokhan/ad_kihon/blob/4bec3c89bdcc9bc055882b1be9dfc6e75557564f/src/check_scheduler.py#L100-L107 is run forever, so the checkers' system completely hangs.