commit 490edd4cc8015fbfad7ca5866a60316728d3c9fd
Author: Harald Jensas <email address hidden>
Date: Tue Jan 16 21:15:22 2018 +0100
Add retry decorator update_segment_host_mapping()
When multiple agents register at the same time there is
a possible race condition causing segment host mappings
updates to fail. StaleDataError raised by SQLAlchemy ORM.
Adding retry_if_session_inactive() decorator to the method
fixes the issue.
Also serialize the method with lockutils. It takes 25+
seconds to update segment host mappings for 10 agents with
the retry decorator alone. With the method serialized the
same operation completes in less than 1 second. The retry
decorator is still required for active/active scenarios.
Closes-Bug: #1743579
Change-Id: I616457f094d000a4016c610b454be8269d9b4948
(cherry picked from commit f84781f246004651e0636f8b6507ee1e48bac6b0)
(cherry picked from commit 59520d6006ce3d6eccda25d81a5155d5328fbd96)
Reviewed: https:/ /review. opendev. org/640447 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=490edd4cc80 15fbfad7ca5866a 60316728d3c9fd
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit 490edd4cc8015fb fad7ca5866a6031 6728d3c9fd
Author: Harald Jensas <email address hidden>
Date: Tue Jan 16 21:15:22 2018 +0100
Add retry decorator update_ segment_ host_mapping( )
When multiple agents register at the same time there is
a possible race condition causing segment host mappings
updates to fail. StaleDataError raised by SQLAlchemy ORM.
Adding retry_if_ session_ inactive( ) decorator to the method
fixes the issue.
Also serialize the method with lockutils. It takes 25+
seconds to update segment host mappings for 10 agents with
the retry decorator alone. With the method serialized the
same operation completes in less than 1 second. The retry
decorator is still required for active/active scenarios.
Closes-Bug: #1743579 a4016c610b454be 8269d9b4948 1e0636f8b6507ee 1e48bac6b0) eccda25d81a5155 d5328fbd96)
Change-Id: I616457f094d000
(cherry picked from commit f84781f24600465
(cherry picked from commit 59520d6006ce3d6