-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Learning Bug Fix: Need to enqueue blocks after execution events (#241)
* We need to enqueue blocks in the Learner when we detect an execution event * If we don't then blocks don't get checked to see if we can use them for learning. * The reason we were occasionally seeing learning occur without this is there's some small probabity * The generation event for the block will be processed by an Analyzer and enqueue the item in the learner * The execution event is processed by the Analyzer * The learner reconciles the generation event * i.e. since the Analyzer and learner run in parallel its possible the execution event gets detected before the learner has had a chance to handle the block in which case the execution event will be part of the blocklog when it is processed by the learner. * We shouldn't notify the learner after processing a log entry about how a block was generated. * This is a legacy from when block generation was logged in Foyle logs but cell executions were logged in RunMe logs * In that case we didn't have any guarantee in the order in which block generation and execution events would be processed * Now that execution events are logged in Foyle Logs we can be reasonably assured that log entries for cell execution will be logged after the log for how the cell was generated. Therefore we can wait until encountering an execution event to process the block in the learner. * This is most likely the most recent bug in #215
- Loading branch information
Showing
5 changed files
with
81 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package server | ||
|
||
import ( | ||
"github.com/gin-gonic/gin" | ||
"github.com/prometheus/client_golang/prometheus/promhttp" | ||
) | ||
|
||
// prometheusHandler wraps the promhttp.Handler() and returns a Gin handler | ||
func prometheusHandler() gin.HandlerFunc { | ||
h := promhttp.Handler() | ||
return func(c *gin.Context) { | ||
h.ServeHTTP(c.Writer, c.Request) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters