Code Monkey home page Code Monkey logo

Comments (1)

0x804d8000 avatar 0x804d8000 commented on May 18, 2024

https://github.com/Tencent/yadcc/blob/master/yadcc/daemon/local/distributed_task_dispatcher.cc#L717

跟这儿有关,每个环境会有一个后台fiber用来获取“请求编译机的授权”。

一般来说,除了立即需要的授权之外,还会多请求一个(预取),这样下一个任务的关键路径上可以节省这一次rpc。这个主要是有些库的编译脚本写的不好(比如部分版本的openssl)的时候必须单线程编,关键路径太长会很难受。

但是对于不存在的环境,这儿就会一直取不到,反复重试。

因为本身这个case命中的比较少,然后代码改动也比较大(需要加一个对fiber的回收逻辑),所以一直也没处理这个问题。

简单的workaroun的话就是收到“环境不存在”的错误的时候直接塞一个已经过期的授权到remaining变量里面去,因为Get的时候会跳过已经过期的,所以倒是能跑。但是这个比较hack,合理的做法还是得搞个timer定期回收TaskGrantKeeper。

目前暂时没有时间规划,等next分支合并了可能会再看看这儿。

from yadcc.

Related Issues (20)

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.