Skip to content

Conversation

LalitDeore
Copy link
Collaborator

No description provided.

Copy link
Member

@frikky frikky left a comment

Choose a reason for hiding this comment

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

:)


if stats.OrgId != orgId {
log.Printf("[WARNING] Org stats data corruption detected. Fixing org stats for org %s (was %s)", orgId, stats.OrgId)
stats.OrgId = orgId
Copy link
Member

Choose a reason for hiding this comment

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

If orgId is empty somehow, this causes a recursive failure due to SetOrgStatistics() calling GetOrgStatistics() in that case. Would cause self-DOS.

Why isn't this fix in SetOrgStatistics() instead of in Get()? Makes little sense to me

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We aren't calling setOrgStatistics() to update the stats we are using transaction and updating directly to "org_statistics". Let me add check for the org id length check so, it won't cause any recursive failure issue.

Copy link
Member

Choose a reason for hiding this comment

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

I still think it will, and will call you at 3AM the day it happens 😆

@frikky frikky merged commit 4b24638 into Shuffle:main Oct 4, 2025
2 of 3 checks passed
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