AloneFire commented on issue #2950: URL: https://github.com/apache/apisix/issues/2950#issuecomment-739691723
> pls provide the steps which can reproduce this issue 只是简单的并发调用 Admin POST接口 ```python from gevent import monkey import gevent monkey.patch_all() from pprint import pprint import requests APIKEY = "****************************" APISIX_HOST = "http://127.0.0.1" def create_route(): api = f"{APISIX_HOST}/apisix/admin/routes" resp = requests.post(api, json={ "uri": "*", "upstream_id": "one upstream_id" }, headers={ "X-API-KEY": APIKEY }) return resp.json().get("node", {}).get("key") if __name__ == '__main__': N = 10 tasks = [gevent.spawn(create_route) for n in range(N)] gevent.joinall(tasks) keys = [t.value for t in tasks] pprint(keys) assert (set([t.value for t in tasks]).__len__() == N) ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
