Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ランキングのエンドポイントが突然死 #698

Open
musaprg opened this issue May 15, 2021 · 2 comments
Open

ランキングのエンドポイントが突然死 #698

musaprg opened this issue May 15, 2021 · 2 comments
Labels

Comments

@musaprg
Copy link
Contributor

musaprg commented May 15, 2021

workaround: #697

要調査

@musaprg musaprg added the bug label May 15, 2021
@musaprg
Copy link
Contributor Author

musaprg commented May 15, 2021

本件、Admin権限持ちのユーザーのSubmissionが紛れているときに発生する模様。

data = table[user_id][:problems][problem_id][:data_sets][data_set_id]

  1. Admin権限ユーザーは@contest.usersに含まれないが、提出が可能
  2. Admin権限ユーザーの提出を含んだランキングを計算する際、create_ranking_tableで作成したテーブルにAdmin権限のユーザーIDの領域が存在しないので、NoMethodError: undefined method '[]' for nil:NilClassが吐かれて死ぬ

ということでした。とりあえずworkaroundの修正はvalidです。

@musaprg
Copy link
Contributor Author

musaprg commented May 15, 2021

そのうち意図したようにちゃんと実装する必要があり

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant