Skip to content

Commit

Permalink
csi plugin create/modify time on upsert
Browse files Browse the repository at this point in the history
  • Loading branch information
pkazmierczak committed Oct 24, 2024
1 parent 270fe0a commit 4e50ac3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nomad/state/state_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -3178,8 +3178,10 @@ func (s *StateStore) UpsertCSIPlugin(index uint64, plug *structs.CSIPlugin) erro
}

plug.ModifyIndex = index
plug.ModifyTime = time.Now().UnixNano()
if existing != nil {
plug.CreateIndex = existing.(*structs.CSIPlugin).CreateIndex
plug.CreateTime = existing.(*structs.CSIPlugin).CreateTime
}

err = txn.Insert("csi_plugins", plug)
Expand Down

0 comments on commit 4e50ac3

Please sign in to comment.