Coder Social home page Coder Social logo

Comments (6)

sutra avatar sutra commented on May 22, 2024

是因为 model 没有设置 primary key 吗?

from gcache.

8treenet avatar 8treenet commented on May 22, 2024

是的

from gcache.

sutra avatar sutra commented on May 22, 2024

能否在没有设置 primary key 时仅给出警告日志,而不要 panic?

from gcache.

8treenet avatar 8treenet commented on May 22, 2024

不能啊,如果没主键这个缓存就没办法搞了,流程就走不下去了。缓存的关系靠主键的key 来识别的。
不过能接受的是,不设置主键的。直接跳过缓存处理。

from gcache.

sutra avatar sutra commented on May 22, 2024

是的,正在排查那些没有设置 primary key 的 model,model 太多了,漏设置的不少,一不小心就撞上 panic,服务 crash 了。

from gcache.

8treenet avatar 8treenet commented on May 22, 2024

设置下主键吧。因该不至于crash。 肯定有recover的。
你需要的话 我就做过个没主键跳过缓存处理。但这样就漏过了。
你看

from gcache.

Related Issues (17)

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.