From af47511d58d77ea8f5851ba4edc40dc3638bc1fc Mon Sep 17 00:00:00 2001 From: James Shubin Date: Sun, 11 Dec 2016 22:39:05 -0500 Subject: [PATCH] resources: Don't dirty resource when poked with activity When we receive a poke with the activity flag set it probably means we are receiving a refresh notification. This doesn't necessarily mean that the resource state should be dirty as a result, in particular if the resource doesn't support refreshing. As a result, don't automatically mark it as dirty. (The engine knows not to skip the CheckApply when the refresh flag is set!) --- resources/sendrecv.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/sendrecv.go b/resources/sendrecv.go index 93c0e88b..7c89aaed 100644 --- a/resources/sendrecv.go +++ b/resources/sendrecv.go @@ -60,8 +60,8 @@ func (obj *BaseRes) ReadEvent(ev *event.Event) (exit, send bool) { var poke bool // ensure that a CheckApply runs by sending with a dirty state... if ev.GetActivity() { // if previous node did work, and we were notified... - obj.StateOK(false) // dirty - poke = true // poke! + //obj.StateOK(false) // not necessarily + poke = true // poke! // XXX: this should be elsewhere in case Watch isn't used (eg: Polling instead...) // XXX: unless this is used in our "fallback" polling implementation??? //obj.SetRefresh(true) // TODO: is this redundant?