Giter Site home page Giter Site logo

Comments (9)

roseduan avatar roseduan commented on June 6, 2024 1

An existed cron library is enough.

from rosedb.

roseduan avatar roseduan commented on June 6, 2024

嗯嗯,目前是执行 Merge 了才会清理。
也可以自定义自动清理的逻辑,你这边啥使用场景呢

from rosedb.

EternalHunters avatar EternalHunters commented on June 6, 2024

嗯嗯,目前是执行 Merge 了才会清理。 也可以自定义自动清理的逻辑,你这边啥使用场景呢

场景就是拿来做本地缓存,例如一个用户数据缓存几分钟。过期后再次回源写入。
所以我使用rosedb时设置了ttl,没想到它不会自动清理文件,现在文件越来越大

from rosedb.

roseduan avatar roseduan commented on June 6, 2024

可以写一个定时任务,系统空闲时执行 Merge 操作

from rosedb.

EternalHunters avatar EternalHunters commented on June 6, 2024

可以写一个定时任务,系统空闲时执行 Merge 操作
目前看rosedb文档也只能这样了

from rosedb.

LindaSummer avatar LindaSummer commented on June 6, 2024

Hi @roseduan , I want to make an enhancement with a background goroutine and configured interval to do merge jobs. It should start after all initializations.
Do we have a way to get metric to guess a more suitable time window to merge or just a fixed interval or cron-expression configured by customer is enough?

from rosedb.

roseduan avatar roseduan commented on June 6, 2024

Hi @roseduan , I want to make an enhancement with a background goroutine and configured interval to do merge jobs. It should start after all initializations. Do we have a way to get metric to guess a more suitable time window to merge or just a fixed interval or cron-expression configured by customer is enough?

Thanks.

I think we can add a simple solution first. A cron expression seems a good choice, which already contains the fixed time interval.

We can add some more complicated routines(metrics) if some users ask for it.

from rosedb.

LindaSummer avatar LindaSummer commented on June 6, 2024

Hi @roseduan , I want to make an enhancement with a background goroutine and configured interval to do merge jobs. It should start after all initializations. Do we have a way to get metric to guess a more suitable time window to merge or just a fixed interval or cron-expression configured by customer is enough?

Thanks.

I think we can add a simple solution first. A cron expression seems a good choice, which already contains the fixed time interval.

We can add some more complicated routines(metrics) if some users ask for it.

Thanks very much for your suggestion. Got it, I will make a cron-expression implementation.

Before coding I want to confirm our rules for third-party libraries.

Can I import an existed cron library or I should implement it from scratch?

from rosedb.

LindaSummer avatar LindaSummer commented on June 6, 2024

An existed cron library is enough.

Got it! Thanks very much for your patience and warm suggestions😁

from rosedb.

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.