問題情報がADTに上書きされないようにする#1553
Open
hotate29 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #1551 fix #1552
元々、クロールした問題情報をデータベースに入れる処理において、既に同じIDの問題が存在する場合は、新しい方の情報で上書きするという処理になっていました。ADTでは、URLのうち問題IDに使われる部分が出典のABCと全く同じ(例: https://atcoder.jp/contests/adt_all_20260617_2/tasks/abc396_a )なので、上書き処理が発動したのだと考えます。
AtCoderProblems/atcoder-problems-backend/src/crawler_utils.rs
Lines 247 to 268 in b57d591
PRでは、
contest_idがadtで始まる問題はproblemテーブルへの挿入処理をスキップするようにして対処しています。この変更で上書きは止まるとは思うんですが、既に上書きされた問題はそのままになるので、それについては別途対処が必要です...。丁寧に書き換えるか、一回ABCの問題データを全部吹き飛ばして再クロールするか...