Skip to content

Calculate disk stats on linux for correct mount point instead of /#4683

Merged
timothycoleman merged 3 commits intomasterfrom
timothycoleman/fix-disk-stats
Jan 22, 2025
Merged

Calculate disk stats on linux for correct mount point instead of /#4683
timothycoleman merged 3 commits intomasterfrom
timothycoleman/fix-disk-stats

Conversation

@timothycoleman
Copy link
Contributor

@timothycoleman timothycoleman commented Dec 16, 2024

Fixed: Disk stats bug introduced in 24.6.0. On Linux the disk usage/capacity were showing the values for the disk mounted at / even if the database was on a different disk

Fixes #4680

Fix for bug introduced after 23.10.x series
@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2024

Qodana for .NET

3 new problems were found

Inspection name Severity Problems
Redundant using directive 🔶 Warning 3

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Detected 176 dependencies

Third-party software list

This page lists the third-party software dependencies used in EventStore

Dependency Version Licenses
AWSSDK.Core 3.7.304 Apache-2.0
AWSSDK.S3 3.7.307.32 Apache-2.0
AWSSDK.SQS 3.7.301.3 Apache-2.0
AWSSDK.SecurityToken 3.7.300.91 Apache-2.0
Acornima 1.1.0 BSD-3-Clause
BenchmarkDotNet.Annotations 0.13.10 MIT
BenchmarkDotNet 0.13.10 MIT
CommandLineParser 2.9.1 MIT
CommunityToolkit.HighPerformance 8.3.2 MIT
DotNext.IO 5.16.1 MIT
DotNext.Threading 5.16.1 MIT
DotNext.Unsafe 5.16.1 MIT
DotNext 5.16.1 MIT
EventStore.Plugins 24.10.6 Elastic-2.0
FluentStorage.AWS 5.5.0 MIT
FluentStorage 5.6.0 MIT
Gee.External.Capstone 2.3.0 MIT
GitInfo 3.3.3 MIT
Google.Protobuf 3.27.2 BSD-3-Clause
Grpc.AspNetCore.Server.ClientFactory 2.64.0 Apache-2.0
Grpc.AspNetCore.Server 2.64.0 Apache-2.0
Grpc.AspNetCore 2.64.0 Apache-2.0
Grpc.Core.Api 2.64.0 Apache-2.0
Grpc.Net.Client 2.64.0 Apache-2.0
Grpc.Net.ClientFactory 2.64.0 Apache-2.0
Grpc.Net.Common 2.64.0 Apache-2.0
Grpc.Tools 2.65.0 Apache-2.0
Iced 1.17.0 MIT
JetBrains.Annotations 2023.3.0 MIT
Jint 4.0.3 BSD-2-Clause
Microsoft.Bcl.AsyncInterfaces 6.0.0 MIT
Microsoft.CSharp 4.7.0 MIT
Microsoft.CodeAnalysis.Analyzers 3.3.3 MIT
Microsoft.CodeAnalysis.Analyzers 3.3.4 MIT
Microsoft.CodeAnalysis.CSharp 4.1.0 MIT
Microsoft.CodeAnalysis.CSharp 4.7.0 MIT
Microsoft.CodeAnalysis.Common 4.1.0 MIT
Microsoft.CodeAnalysis.Common 4.7.0 MIT
Microsoft.Data.Sqlite.Core 8.0.0 MIT
Microsoft.Data.Sqlite 8.0.0 MIT
Microsoft.Diagnostics.NETCore.Client 0.2.452401 MIT
Microsoft.Diagnostics.Runtime 2.2.332302 MIT
Microsoft.Diagnostics.Tracing.TraceEvent 3.1.6 MIT
Microsoft.DotNet.PlatformAbstractions 3.1.6 MIT
Microsoft.Extensions.Configuration.Abstractions 8.0.0 MIT
Microsoft.Extensions.Configuration.Binder 8.0.0 MIT
Microsoft.Extensions.Configuration.EnvironmentVariables 3.1.0 Apache-2.0
Microsoft.Extensions.Configuration.FileExtensions 8.0.0 MIT
Microsoft.Extensions.Configuration.Json 8.0.0 MIT
Microsoft.Extensions.Configuration 8.0.0 MIT
Microsoft.Extensions.DependencyInjection.Abstractions 8.0.0 MIT
Microsoft.Extensions.DependencyInjection.Abstractions 8.0.1 MIT
Microsoft.Extensions.DependencyInjection 8.0.0 MIT
Microsoft.Extensions.DependencyModel 8.0.1 MIT
Microsoft.Extensions.DependencyModel 8.0.2 MIT
Microsoft.Extensions.FileProviders.Abstractions 8.0.0 MIT
Microsoft.Extensions.FileProviders.Composite 8.0.0 MIT
Microsoft.Extensions.FileProviders.Embedded 8.0.0 MIT
Microsoft.Extensions.FileProviders.Physical 8.0.0 MIT
Microsoft.Extensions.FileSystemGlobbing 8.0.0 MIT
Microsoft.Extensions.Hosting.Abstractions 2.1.0 Apache-2.0
Microsoft.Extensions.Http 6.0.0 MIT
Microsoft.Extensions.Logging.Abstractions 8.0.0 MIT
Microsoft.Extensions.Logging.Configuration 3.1.0 Apache-2.0
Microsoft.Extensions.Logging 8.0.0 MIT
Microsoft.Extensions.ObjectPool 6.0.16 MIT
Microsoft.Extensions.Options.ConfigurationExtensions 3.1.0 Apache-2.0
Microsoft.Extensions.Options 8.0.0 MIT
Microsoft.Extensions.Primitives 8.0.0 MIT
Microsoft.FASTER.Core 1.9.16 MIT
Microsoft.IO.RecyclableMemoryStream 3.0.1 MIT
Microsoft.IdentityModel.Abstractions 7.6.0 MIT
Microsoft.IdentityModel.JsonWebTokens 7.6.0 MIT
Microsoft.IdentityModel.Logging 7.6.0 MIT
Microsoft.IdentityModel.Tokens 7.6.0 MIT
Microsoft.NETCore.Platforms 2.0.0 MIT
Microsoft.NETCore.Platforms 5.0.0 MIT
Microsoft.Net.Http.Headers 8.0.0 MIT
Microsoft.Win32.Registry 4.4.0 MIT
Microsoft.Win32.Registry 5.0.0 MIT
Mono.Posix.NETStandard 1.0.0 MIT
NETStandard.Library 2.0.3 MIT
NetEscapades.Configuration.Yaml 3.1.0 MIT
Newtonsoft.Json 13.0.3 MIT
OpenTelemetry.Api 1.4.0-rc.1 Apache-2.0
OpenTelemetry.Exporter.Prometheus.AspNetCore 1.4.0-rc.1 Apache-2.0
OpenTelemetry.Extensions.DependencyInjection 1.4.0-rc.1 Apache-2.0
OpenTelemetry.Extensions.Hosting 1.4.0-rc.1 Apache-2.0
OpenTelemetry 1.4.0-rc.1 Apache-2.0
Perfolizer 0.2.1 MIT
Quickenshtein 1.5.1 MIT
RestSharp 112.0.0 Apache-2.0
SQLitePCLRaw.bundle_e_sqlite3 2.1.6 Apache-2.0
SQLitePCLRaw.core 2.1.6 Apache-2.0
SQLitePCLRaw.lib.e_sqlite3 2.1.6 Apache-2.0
SQLitePCLRaw.provider.e_sqlite3 2.1.6 Apache-2.0
Scrutor 5.0.2 MIT
Serilog.Enrichers.Process 3.0.0 Apache-2.0
Serilog.Enrichers.Thread 4.0.0 Apache-2.0
Serilog.Expressions 5.0.0 Apache-2.0
Serilog.Extensions.Logging 8.0.0 Apache-2.0
Serilog.Settings.Configuration 8.0.2 Apache-2.0
Serilog.Sinks.Async 2.0.0 Apache-2.0
Serilog.Sinks.Console 6.0.0 Apache-2.0
Serilog.Sinks.File 6.0.0 Apache-2.0
Serilog 4.0.1 Apache-2.0
SharpDotYaml.Extensions.Configuration 0.3.0 MIT
System.Buffers 4.5.1 MIT
System.CodeDom 5.0.0 MIT
System.Collections.Concurrent 4.3.0 MIT
System.Collections.Immutable 5.0.0 MIT
System.Collections.Immutable 7.0.0 MIT
System.Collections 4.3.0 MIT
System.ComponentModel.Composition 8.0.0 MIT
System.Configuration.ConfigurationManager 8.0.0 MIT
System.Diagnostics.Debug 4.3.0 MIT
System.Diagnostics.DiagnosticSource 8.0.1 MIT
System.Diagnostics.EventLog 8.0.0 MIT
System.Diagnostics.PerformanceCounter 8.0.0 MIT
System.Diagnostics.Tracing 4.3.0 MIT
System.Formats.Asn1 8.0.1 MIT
System.Globalization.Calendars 4.3.0 MIT
System.Globalization.Extensions 4.3.0 MIT
System.Globalization 4.3.0 MIT
System.IO.FileSystem.Primitives 4.3.0 MIT
System.IO.FileSystem 4.3.0 MIT
System.IO.Hashing 8.0.0 MIT
System.IO.Pipelines 8.0.0 MIT
System.IO 4.3.0 MIT
System.Interactive.Async 5.0.0 MIT
System.Linq.Async 6.0.1 MIT
System.Linq 4.3.0 MIT
System.Management 5.0.0 MIT
System.Memory 4.5.3 MIT
System.Memory 4.5.4 MIT
System.Memory 4.5.5 MIT
System.Net.Http 4.3.4 MIT
System.Net.Primitives 4.3.0 MIT
System.Numerics.Vectors 4.4.0 MIT
System.Reactive 6.0.1 MIT
System.Reflection.Metadata 5.0.0 MIT
System.Reflection.Metadata 7.0.0 MIT
System.Reflection.Primitives 4.3.0 MIT
System.Reflection 4.3.0 MIT
System.Resources.ResourceManager 4.3.0 MIT
System.Runtime.CompilerServices.Unsafe 5.0.0 MIT
System.Runtime.CompilerServices.Unsafe 6.0.0 MIT
System.Runtime.Extensions 4.3.0 MIT
System.Runtime.Handles 4.3.0 MIT
System.Runtime.InteropServices 4.3.0 MIT
System.Runtime.Numerics 4.3.0 MIT
System.Security.AccessControl 4.4.0 MIT
System.Security.AccessControl 5.0.0 MIT
System.Security.Cryptography.Algorithms 4.3.0 MIT
System.Security.Cryptography.Cng 4.3.0 MIT
System.Security.Cryptography.Csp 4.3.0 MIT
System.Security.Cryptography.Pkcs 8.0.0 MIT
System.Security.Cryptography.ProtectedData 8.0.0 MIT
System.Security.Cryptography.Xml 8.0.0 MIT
System.Security.Principal.Windows 4.4.0 MIT
System.Security.Principal.Windows 5.0.0 MIT
System.ServiceModel.Http 6.2.0 MIT
System.ServiceModel.Primitives 6.2.0 MIT
System.Text.Encoding.CodePages 4.5.1 MIT
System.Text.Encoding.CodePages 7.0.0 MIT
System.Text.Encodings.Web 8.0.0 MIT
System.Text.Json 8.0.5 MIT
System.Threading.Channels 9.0.0 MIT
System.Threading.Tasks.Extensions 4.5.4 MIT
TestableIO.System.IO.Abstractions.Wrappers 21.0.22 MIT
TestableIO.System.IO.Abstractions 21.0.22 MIT
ThisAssembly.Constants 1.4.1 MIT
YamlDotNet 15.1.4 MIT
YamlDotnet 13.7.1 MIT
librdkafka.redist 2.5.0 Apache-2.0
system.uritemplate MIT
Contact Qodana team

Contact us at qodana-support@jetbrains.com

shaan1337
shaan1337 previously approved these changes Dec 16, 2024
Copy link
Member

@shaan1337 shaan1337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested on linux

…'t mapped, which is unlikely irl but happening in some of the memdb? tests)
@timothycoleman timothycoleman force-pushed the timothycoleman/fix-disk-stats branch from ec735e6 to da9c611 Compare December 16, 2024 15:05
@timothycoleman timothycoleman marked this pull request as ready for review December 16, 2024 17:19
@timothycoleman timothycoleman requested a review from a team as a code owner December 16, 2024 17:19
@hayley-jean hayley-jean added the bug Issues which are a software defect label Dec 18, 2024
@RagingKore
Copy link
Contributor

tested on MacOS Sequoia 15.2 M2 MAX and the values seem ok.

Copy link
Contributor

@RagingKore RagingKore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@timothycoleman timothycoleman merged commit 9a6e865 into master Jan 22, 2025
1 check passed
@timothycoleman timothycoleman deleted the timothycoleman/fix-disk-stats branch January 22, 2025 12:42
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 @timothycoleman Failed to create cherry Pick PR due to error:

ReferenceError: oktokit is not defined
   at createPullRequest (/home/runner/work/_actions/EventStore/Automations/master/lib/index.js:177:5)
   at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
   at async createPullRequestWithCherryPick (/home/runner/work/_actions/EventStore/Automations/master/cherry-pick-pr-for-label/index.js:66:40)
   at async run (/home/runner/work/_actions/EventStore/Automations/master/cherry-pick-pr-for-label/index.js:143:25)

🚨👉 Check https://github.com/EventStore/EventStore/actions/runs/12908449728

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issues which are a software defect cherry-pick:release/v24.10

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Metrics reporting wrong values

4 participants

Comments