VOL-1509 : Partial fix for merging issue
- Changed channel map in etcd to a sync.Map
- Changed graph boundaryPorts to sync.Map
- Added logic to check if proxy access is currently reserved
- Changed watch logic to exit when proxy access in progress
- Fixed UpdateAllChildren method
- Commented out the Drop operation again in node.go
Change-Id: I8a61798e907be0ff6b0785dcc70721708308611d
diff --git a/db/model/non_persisted_revision.go b/db/model/non_persisted_revision.go
index cb8c9ca..1b9325d 100644
--- a/db/model/non_persisted_revision.go
+++ b/db/model/non_persisted_revision.go
@@ -313,14 +313,13 @@
npr.mutex.Lock()
defer npr.mutex.Unlock()
- newRev := &NonPersistedRevision{}
+ newRev := npr
newRev.Config = npr.Config
newRev.Hash = npr.Hash
newRev.Branch = branch
newRev.Children = make(map[string][]Revision)
- for entryName, childrenEntry := range npr.Children {
- newRev.Children[entryName] = make([]Revision, len(childrenEntry))
- copy(newRev.Children[entryName], childrenEntry)
+ for entryName, childrenEntry := range children {
+ newRev.Children[entryName] = append(newRev.Children[entryName], childrenEntry...)
}
newRev.Finalize(false)