There are some confusions in the process of reading the source code

オープン
#65 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
20/100
issue の種類
ドキュメント
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
go
領域
backend

調査の方向性

Start with fastcache.go, the Get() function around line 341, and trace genSizeBits and the bucket reset logic. Confirm the intended generation rollover behavior; done means clarifying the semantics in the issue or documenting them for readers of the source.

索引モデルが issue の本文から書いたものです。

説明

    b.gen++
    if b.gen&((1<<genSizeBits)-1) == 0 {
    b.gen++
    }

Hello the developers of fastcache. I am learning how this library running by read the source code.
And i have some confuses when reading the code of function Get() in fastcache.go, line 341.

In my opinion, the field gen in bucket means the reset rounds that the chunk had experienced.
And if gen reach the maximum 1<<genSizeBits it should be reset to 1 and not be gen++.

Is my understanding correct?

主要言語
Go
スター
2.4k
フォーク
199
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

VictoriaMetrics/fastcache のほかの issue

VictoriaMetrics/fastcache の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。