mirror of https://github.com/milvus-io/milvus.git
fix(db): get group bug fix
Former-commit-id: 0a7cc7e3791bf02ea899a3cafdc5698e52334027pull/191/head
parent
4eea03af5c
commit
315e532792
|
@ -118,7 +118,7 @@ Status DBMetaImpl::delete_group_partitions(const std::string& group_id,
|
|||
return status;
|
||||
}
|
||||
|
||||
auto yesterday = GetDate(-2);
|
||||
auto yesterday = GetDateWithDelta(-2);
|
||||
|
||||
for (auto& date : dates) {
|
||||
if (date >= yesterday) {
|
||||
|
|
|
@ -31,10 +31,14 @@ DateT Meta::GetDate(const std::time_t& t, int day_delta) {
|
|||
return ltm->tm_year*10000 + ltm->tm_mon*100 + ltm->tm_mday;
|
||||
}
|
||||
|
||||
DateT Meta::GetDate(int day_delta) {
|
||||
DateT Meta::GetDateWithDelta(int day_delta) {
|
||||
return GetDate(std::time(nullptr), day_delta);
|
||||
}
|
||||
|
||||
DateT Meta::GetDate() {
|
||||
return GetDate(std::time(nullptr), 0);
|
||||
}
|
||||
|
||||
} // namespace meta
|
||||
} // namespace engine
|
||||
} // namespace vecwise
|
||||
|
|
|
@ -100,8 +100,9 @@ public:
|
|||
|
||||
virtual Status count(const std::string& group_id, long& result) = 0;
|
||||
|
||||
static DateT GetDate(const std::time_t& t, int day_delta);
|
||||
static DateT GetDate(int day_delta = 0);
|
||||
static DateT GetDate(const std::time_t& t, int day_delta = 0);
|
||||
static DateT GetDate();
|
||||
static DateT GetDateWithDelta(int day_delta);
|
||||
|
||||
}; // MetaData
|
||||
|
||||
|
|
Loading…
Reference in New Issue