This repository has been archived by the owner on Jul 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement influx client extension
Implement an influx client extenstion that allows for direct
serialization to a struct instead of needing to traverse the result and
build it by hand. Ex:
```rust
struct MgsFsTime {
time: u64,
}
let xs: Vec<MgsFsTime> = client
.query_into(
format!(
r#"
SELECT mgs_fs,is_mgs_fs
FROM target
WHERE mgs_fs='{}' AND is_mgs_fs=true
ORDER BY time ASC
LIMIT 2"#,
fs_names
)
.as_str(),
Some(Precision::Nanoseconds),
)
.await?
.unwrap_or_default();
```
Signed-off-by: Joe Grund <jgrund@whamcloud.io>
* Fix Stat deletion
The current targets table is intermittently losing it's filesystems for
some targets.
This appears to be because we delete stat info before inserting the next
batch. If anyone queries during this gap, they will get empty data even
though we have the points, they just haven't been inserted yet.
In addition, we are clearing out all stats except a single point for any target colocated on the MGS node.
This patch waits until after insertion to do a deletion, and scopes the
delete so it should only effect the correct stat.
Fixes #2258.
Signed-off-by: Joe Grund <jgrund@whamcloud.io>
- Loading branch information
Showing
8 changed files
with
158 additions
and
216 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.