mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-08-27 20:40:13 +03:00
When opening a project, nodes are created with Pool(concurrency=100). Each _create_node did an unlocked check-then-act: 'if compute not in _project_created_on_compute' -> await POST /projects -> add(compute). The await let dozens of concurrent node creations race past the check before any registered, each firing a redundant POST /projects at the same compute. The compute-side sync handler then ran in a thread pool and instantiated the Project N times (the repeated 'Project ... created' INFO logs, ~16x). Guard the check+POST+register with a project-level asyncio.Lock. The first creation holds it for one POST; the rest acquire, see the compute already registered, and return immediately — negligible serialization. Also annotate the node/link progress logs with project name+id and add completion lines, so the log clearly shows which project is loading and when each phase finishes.