-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor wal stage 1 #561
refactor wal stage 1 #561
Conversation
LGTM |
} | ||
} | ||
|
||
// Event . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
打错了...
@@ -329,3 +319,7 @@ func (h *ProcessingCreatedHandler) Handle(ctx context.Context, raw interface{}) | |||
logger.Infof(ctx, "obsolete processing deleted") | |||
return | |||
} | |||
|
|||
func getReplayContext(ctx context.Context) (context.Context, context.CancelFunc) { | |||
return context.WithTimeout(ctx, time.Second*32) // TODO why 32? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctx这块确实有点乱了,以后要花点精力重整一下...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这种我都已经……弃疗了,你整理下吧
跟这个PR无关的一个疑问: |
跟这个PR无关的一些其它疑问:
|
曾经的语义是批处理的粒度, 防止对 docker 的并发请求太大挂掉, 不过后来改成了先按照 node 聚类并且引入了 goroutine pool 限制并发就没有使用这个参数了. |
|
这里只能根据 Success 来判断是否 remove 成功,感觉不太好处理 |
对的 |
我改了4点钟的一部分 @DuodenumL |
发现现在wal的覆盖范围不是很完整,例如remove / dissociate / realloc里都可能会导致资源状态不一致。所以应该把 |
今天发现wal还有一个问题:create里的wal commit是在defer里面做的,假设下面的代码panic了,defer依然会被执行,导致wal commit也被执行了,下次重启的时候不会做相关的处理。 目前想到的解决方法就是在defer里加一个判断,类似于这样,可以防止在panic的时候提交wal:
不过这样做虽然work,但是看起来很丑,不知道有没有优雅的做法。 |
想了下,目前只能这样写…… |
我先合了,后续 wal 改动再搞新 PR |
嗯嗯 |
No description provided.