20457: Add logging in test case wrt 503 responses.
[arvados.git] / lib / dispatchcloud / container / queue.go
index 938ef915f251e4d27e1ea4f714b82f10425d4224..5f6fdefbd51052289407930bbd0aa14b0ae6039e 100644 (file)
@@ -233,6 +233,11 @@ func (cq *Queue) delEnt(uuid string, state arvados.ContainerState) {
 // Caller must have lock.
 func (cq *Queue) addEnt(uuid string, ctr arvados.Container) {
        it, err := cq.chooseType(&ctr)
+
+       // Avoid wasting memory on a large Mounts attr (we don't need
+       // it after choosing type).
+       ctr.Mounts = nil
+
        if err != nil && (ctr.State == arvados.ContainerStateQueued || ctr.State == arvados.ContainerStateLocked) {
                // We assume here that any chooseType error is a hard
                // error: it wouldn't help to try again, or to leave