GithubHelp home page GithubHelp logo

「友だちリストに友だちになったばかりのユーザが表示されていません」と出てしまう about isucon5-qualify HOT 4 CLOSED

isucon avatar isucon commented on August 16, 2024
「友だちリストに友だちになったばかりのユーザが表示されていません」と出てしまう

from isucon5-qualify.

Comments (4)

tagomoris avatar tagomoris commented on August 16, 2024

304行目のエラーメッセージが間違っているのはそのとおりです。(pull-requestをお待ちしています)

足跡について「処理のタイミング的に1秒ずれてしまう可能性があり」というのは質問の意味がわかりません。user2/user3がuser1のプロフィールを表示しているのは(ベンチマークツール側から見て)user1のプロフィール更新よりも前の話であり、であれば「1秒後までにGETの結果に反映されていること」というレギュレーションを満たすためには、ここで2件の足跡が残っている(表示されている)必要があります。
「処理のタイミング的に1秒ずれて」しまうのであれば、それはアプリケーションの問題としてfailになるべきもののように思えます。

from isucon5-qualify.

yuki2006 avatar yuki2006 commented on August 16, 2024

お返事ありがとうございます。

例えばですが、user2 が 12:00:00.90 に足跡を残し、user3が12:00:01.10に足跡が残った場合
(これはアクセス時間というより、内部実装的にデータベースに足跡が残った時間ということになりますが)

それぞれ時間的に12:00:00 , 12:00:01となりfootprintDateでfilterするとどちらかしか残らないように思いました。

見当違いでしたら申し訳ないですが。

from isucon5-qualify.

tagomoris avatar tagomoris commented on August 16, 2024

footprintDate は date であって time を含まない(see DateTimeFormatter.ISO_LOCAL_DATE)ので、user2とuser3が偶然日をまたがない限りは大丈夫です。つまり例として 23:59:59.999 と 00:00:00.001 になったら問題が起きますね。
が、予選は日中に開催されることもあるので現実的には問題にならないだろうとして除外しています。簡単に対応できる方法があるならmergeすることはやぶさかではありませんが。

from isucon5-qualify.

yuki2006 avatar yuki2006 commented on August 16, 2024

申し訳ないです。
DateTimeFormatter .ISO_LOCAL_DATE); // yyyy-MM-dd
を見落としておりました。
コメントも書かれていたのに頭に入ってなかったです。。
申し訳ないです。

(きちんと調べきれてないですが、単純にこちらのアプリケーションの処理時間がかかりすぎてただけだったのかもしれません。)

from isucon5-qualify.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.