Git Product home page Git Product logo

forest's Introduction

forest's People

Contributors

busgo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

forest's Issues

你好,前端任务配置后,点立即执行报错

forest.go 配置 为DefaultEndpoints = "127.0.0.1:2379,47.52.112.191:2379",
报错信息为
{"time":"2020-08-04T14:29:00.1275917+08:00","level":"WARN","prefix":"-","file":"executor.go","line":"46","message":"the group:test,select a client error:&errors.errorString{s:"the group:test,has no client to select"}"}
前端调度集群只有leader没有floower

选举的Leader问题

如果选取的Leader的机器发生故障,可以重新选取Leader吗,有具体过程吗,谢谢

关于util.go TimeSubDays方法的问题

你好,看了下源码,有个问题想请教下你。这里的 if t1.Location().String() != t2.Location().String() 只有时间相同的时候才能走到下面, 时间相同的时候if hours <= 0 条件和会生效,返回-1.
程序本意就是这样的吗?不太明白这个函数的作用了。后面也有用到这个工具,希望能解答下,非常感谢!

func TimeSubDays(t1, t2 time.Time) int {

	if t1.Location().String() != t2.Location().String() {
		return -1
	}
	hours := t1.Sub(t2).Hours()

	if hours <= 0 {
		return -1
	}
	// sub hours less than 24
	if hours < 24 {
		// may same day
		t1y, t1m, t1d := t1.Date()
		t2y, t2m, t2d := t2.Date()
		isSameDay := (t1y == t2y && t1m == t2m && t1d == t2d)

		if isSameDay {

			return 0
		} else {
			return 1
		}

	} else { // equal or more than 24

		if (hours/24)-float64(int(hours/24)) == 0 { // just 24's times
			return int(hours / 24)
		} else { // more than 24 hours
			return int(hours/24) + 1
		}
	}

}

没有找到此要执行的任务作业节点

任务点击立即执行,报错:没有找到此要执行的任务作业节点。查日志:the group:shell-1,select a client error:&errors.errorString{s:"the group:shell-1,has no client to select。但是我的任务集群已经创建了。这是怎么回事?

leader 节点重启 故障恢复

leader节点重启或者宕机,follower选举,然后故障恢复任务。
有一种可能follower先执行力watch任务,此时node的state是follower。
这样会导致follower没有故障恢复,随后选举成功。
但是此时以及错过了 恢复阶段,导致此场景没有故障恢复。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.