Skip to content

Commit

Permalink
Fdb: fix GetInt64(...) in FdbSystemStatus that was overflowing on 32 …
Browse files Browse the repository at this point in the history
…bits instead of 64-bits

- Would throw OverflowException when trying to read, for example, Memory.FreeBytes or equivalent that was overflowing a 32 bit int
  • Loading branch information
KrzysFR committed Jul 2, 2024
1 parent 1c04816 commit 48db668
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FoundationDB.Client/Status/FdbSystemStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ protected MetricsBase(JsonObject? data)

protected int? GetInt32(string field1, string field2) => m_data != null && m_data.TryGetObject(field1, out var v1) && v1.TryGet<int>(field2, out var v2) ? v2 : null;

protected long? GetInt64(string field) => m_data?.Get<int?>(field, null);
protected long? GetInt64(string field) => m_data?.Get<long?>(field, null);

protected long? GetInt64(string field1, string field2) => m_data != null && m_data.TryGetObject(field1, out var v1) && v1.TryGet<long>(field2, out var v2) ? v2 : null;

Expand Down

0 comments on commit 48db668

Please sign in to comment.