Skip to content

Update for 26.2, misc. cleanup and modern nickname cleanup - #111

Draft
calcastor wants to merge 6 commits into
PGMDev:devfrom
calcastor:26.2
Draft

calcastor wants to merge 6 commits into
PGMDev:devfrom
calcastor:26.2

Conversation

@calcastor

Copy link
Copy Markdown
Contributor

No description provided.

@calcastor
calcastor force-pushed the 26.2 branch 4 times, most recently from 2fc7012 to 8257eac Compare July 26, 2026 07:29
@calcastor
calcastor marked this pull request as ready for review July 27, 2026 00:17
@calcastor
calcastor force-pushed the 26.2 branch 2 times, most recently from 18552f4 to c89d75d Compare August 10, 2026 02:56
@calcastor calcastor changed the title Update modern platform to 26.2; misc fixes/cleanup 26.2, cleanup, and migrate to new nickname API Aug 24, 2026
@calcastor
calcastor marked this pull request as draft August 24, 2026 01:09
@calcastor

Copy link
Copy Markdown
Contributor Author

Draft as this requires PGMDev/PGM#1648 and PGMDev/PGM#1721

@calcastor
calcastor force-pushed the 26.2 branch 4 times, most recently from d58d121 to 7ccfc8f Compare August 25, 2026 03:28
@calcastor calcastor changed the title 26.2, cleanup, and migrate to new nickname API Update for 26.2, misc. cleanup and modern nickname cleanup Aug 25, 2026
@calcastor
calcastor force-pushed the 26.2 branch 2 times, most recently from ee6c514 to 47d631e Compare September 1, 2026 03:09
@calcastor
calcastor force-pushed the 26.2 branch 2 times, most recently from 220237b to b50ff96 Compare September 7, 2026 04:54
@calcastor
calcastor force-pushed the 26.2 branch 4 times, most recently from 43f0c45 to 349ad7d Compare October 2, 2026 06:18
Signed-off-by: BT <43831917+calcastor@users.noreply.github.com>
Signed-off-by: BT <43831917+calcastor@users.noreply.github.com>
String TABLE_NAME = "sessions";
String TABLE_FIELDS =
"(id VARCHAR(36) PRIMARY KEY, player VARCHAR(36), disguised BOOL, server VARCHAR(32), start_time BIGINT, end_time BIGINT)";
"(id VARCHAR(36) PRIMARY KEY, player VARCHAR(36), disguised BOOL, server VARCHAR(64), start_time BIGINT, end_time BIGINT)";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Was this increased to accommodate longer server IDs? Just flagging that changing the definition here won’t widen the columns in existing databases, so existing setups (OCC) would need a migration or manual change to benefit from it. Would be nice if we added a migration system in Community, but that's kinda out of scope for this PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was, though I doubt it's absolutely necessary. A migration system would be nice, though existing dbs remain compatible.

for (boolean ignoreDisguised : new boolean[] {false, true}) {
SessionData data =
sessionCache.getIfPresent(new SessionQuery(session.getPlayerId(), ignoreDisguised));
if (data != null) data.updateEndDate(session);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmmm. I think there might still be a race if a player quits while a lookup is loading. updateEndDate() does nothing when the cache entry hasn't loaded yet, so the delayed lookup can then cache the old session with no end time.

Maybe we can track changes during the load and retry if the session was updated before the result came back?

Signed-off-by: BT <43831917+calcastor@users.noreply.github.com>
@calcastor
calcastor force-pushed the 26.2 branch 2 times, most recently from 0b5d5ee to ba5e59d Compare October 12, 2026 15:45
Signed-off-by: applenick <applenick@users.noreply.github.com>
Signed-off-by: applenick <applenick@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants