Skip to content

[BUG] AccountTier read reserved values as int instead of long#1457

Merged
scottf merged 1 commit intomainfrom
account-tier-read-bug
Oct 14, 2025
Merged

[BUG] AccountTier read reserved values as int instead of long#1457
scottf merged 1 commit intomainfrom
account-tier-read-bug

Conversation

@scottf
Copy link
Contributor

@scottf scottf commented Oct 14, 2025

Also...

  • removed experimental tag for getFirstMessage
  • Reused existing variable on KV create
  • cleaned up a key value test

reservedMemory = readInteger(vAccountTier, RESERVED_MEMORY, 0);
reservedStorage = readInteger(vAccountTier, RESERVED_STORAGE, 0);
reservedMemory = readLong(vAccountTier, RESERVED_MEMORY, 0);
reservedStorage = readLong(vAccountTier, RESERVED_STORAGE, 0);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the actual bug fix for this PR.

long revision = kve.getRevision();
if (revision > 0) {
return _update(key, value, kve.getRevision(), messageTtl);
return _update(key, value, revision, messageTtl);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

use the variable that was already assigned, duh

* Get MessageInfo for the first message created at or after the start time.
* <p>
* This API 1) is currently EXPERIMENTAL and is subject to change. 2) Works on Server 2.11 or later
* This API works on Server 2.11 or later
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not experimental for a while

.build();
kvm.create(config);

Dispatcher d = nc.createDispatcher();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ocd refactor

Copy link
Member

@aricart aricart left a comment

Choose a reason for hiding this comment

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

LGTM

@scottf scottf merged commit 43f2115 into main Oct 14, 2025
4 checks passed
@scottf scottf deleted the account-tier-read-bug branch October 14, 2025 21:17
@scottf scottf changed the title [bug] AccountTier read reserved values as int instead of long [BUG] AccountTier read reserved values as int instead of long Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants