タグ

ブックマーク / medium.com (4)

  • InnoDB のロック機構について

    n 番煎じネタですが、一度やってみたかったので手元で検証してみました。 特段新しいものは無いと思いますが、インテンションロックと各種ロックタイプを網羅的に挙動検証する記事は自分の観測範囲にはなかったはず? 図を用意できたら読みやすかったと思うのですが、怠慢したので innodb_status_output_locks の出力でご容赦ください データセット今回使うデータセットです mysql> show global variables like ‘version’; + — — — — — — — -+ — — — — + | Variable_name | Value | + — — — — — — — -+ — — — — + | version | 5.7.26 | + — — — — — — — -+ — — — — + 1 row in set (0.00 sec)mysql>

    InnoDB のロック機構について
  • Unit Testing Golang HTTP Middleware - Kyle Purdon - Medium

    Unit-Testing Golang HTTP Middleware is simple, but a topic that is not well covered. This post covers an example http middleware including unit tests. Constructing and using idiomatic http middleware is a story that’s already been told. See this, this, or simply google it to learn more about the topic. Something you won’t find in that search is how to unit test http middleware in Golang. The examp

    Unit Testing Golang HTTP Middleware - Kyle Purdon - Medium
  • HTTPサーバとcontext.Context

    golang で HTTP サーバを書く際に,どう context.Context を活用したら良いか,今考えていることをまとめておきます はじめにgolang における強力な道具の一つに context.Context interface というのがあります.キャンセルをサブルーチンに伝搬したり,限られたスコープ内で一貫してアクセスできるインメモリ KV ストア的な役目を担っています. サーバにおいても,リクエストがキャンセルされたら handler の内部で行う高コストな計算や外部リソースへのアクセスもキャンセルできるようにしておくのが望ましいはずです.また,リクエストスコープに閉じる値を保持するインメモリ KV ストアとしての役割も context で担えます. そこで,HTTP サーバを書く際にどのようにcontext.Context を活用するのが良いかをまとめたいと思います.

    cpp_0302
    cpp_0302 2018/10/04
  • Medium

    You can find (just about) anything on Medium — apparently even a page that doesn’t exist. Maybe these stories about finding what you didn’t know you were looking for will take you somewhere new?

  • 1