You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CreateMcis 함수는 goroutine 을 사용하여 AddVmToMcis 함수를 실행합니다.
AddVmToMcis => CreateVm => UpdateAssociatedObjectList 의 콜체인이 있습니다.
UpdateAssociatedObjectList 의 "add" 부분 안에, associatedObjectList 리스트를 읽고 쓰는 동작이 있습니다.
이 때, associatedObjectList 리스트에 대한 락이 없기 때문에, 이런 현상이 생기는 것으로 추정합니다.
예: 거의 동시에 jhseo-0 과 jhseo-1 을 기록하려고 하면,
거의 동시에 UpdateAssociatedObjectList 함수가 실행되고,
이 함수 인스턴스에서 associatedObjectList 리스트를 Key-Value store 에서 읽으면
두 함수 인스턴스 모두에서 associatedObjectList 리스트가 비어 있는 것으로 나옴.
두 함수 인스턴스가 각각 jhseo-0 과 jhseo-1 을 기록하고 Key-Value store 에 저장하면,
둘 중 빨리 수행된 쪽의 결과만 남게 됨
Environment
Source version or branch:
OS:
Others:
Proposed solution
:
lock ?
critical section ?
Any other context
:
The text was updated successfully, but these errors were encountered:
현재
test/official/sequentialFullTest/testAll-mcis-mcir-ns-cloud.sh
스크립트는3개의 VM으로 구성되는 1개의 MCIS를 생성합니다.
❯ ./testAll-mcis-mcir-ns-cloud.sh mock 1 jhseo
이 스크립트를 실행하면, 먼저
5종류의 CB-Tumblebug MCIR object 를 1개씩 생성하고,
이후 3개의 VM으로 구성되는 1개의 MCIS를 생성하면서
위에서 생성한 MCIR 들의
associatedObjectList
필드를 업데이트 합니다.What you expected to happen
:
그러므로,
associatedObjectList
필드에는 VM 3개의 key가 기록되어 있어야 정상입니다.❯ ./list-image.sh
What happened
:
문제는, key가 3개 기록되는 경우도 있고, 간헐적으로 key가 2개 기록되는 경우도 있다는 것입니다.
❯ ./list-image.sh
[다른 회차]
❯ ./list-image.sh
How to reproduce it (as minimally and precisely as possible)
:
Anything else we need to know?
:
[추정]
CreateMcis
함수는 goroutine 을 사용하여AddVmToMcis
함수를 실행합니다.AddVmToMcis
=>CreateVm
=>UpdateAssociatedObjectList
의 콜체인이 있습니다.UpdateAssociatedObjectList
의 "add" 부분 안에,associatedObjectList
리스트를 읽고 쓰는 동작이 있습니다.associatedObjectList
리스트에 대한 락이 없기 때문에, 이런 현상이 생기는 것으로 추정합니다.jhseo-0
과jhseo-1
을 기록하려고 하면,거의 동시에
UpdateAssociatedObjectList
함수가 실행되고,이 함수 인스턴스에서
associatedObjectList
리스트를 Key-Value store 에서 읽으면두 함수 인스턴스 모두에서
associatedObjectList
리스트가 비어 있는 것으로 나옴.두 함수 인스턴스가 각각
jhseo-0
과jhseo-1
을 기록하고 Key-Value store 에 저장하면,둘 중 빨리 수행된 쪽의 결과만 남게 됨
Environment
Proposed solution
:
Any other context
:
The text was updated successfully, but these errors were encountered: