Clarification: k and v contents may be modified after returning from Set.

Aperta
#69 2 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
documentation

Direzione di ricerca

Review the documentation for Set and the other methods with the same descriptor, starting with the wording quoted in the issue. Confirm how the methods handle the k and v byte arrays, then revise the text so readers do not interpret it as the methods modifying those arrays; done means the ownership and reuse behavior is unambiguous.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Several methods have a similar descriptor to the following in the docs:

k and v contents may be modified after returning from Set.

Upon first reading, I assumed that the Set() method would modify the k and v byte arrays and copies should be passed into the fastcache methods.

I couldn't believe it and only after spending some time digging in the source did I realize that these sentences probably meant that the fastcache methods themselves stored copies of the k and v arrays and that you didn't have to worry about reusing the originals.

Just a heads up, I found the particular wording confusing, perhaps consider a slightly different wording.

Lingua principale
Go
Stelle
2.4k
Fork
199
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di VictoriaMetrics/fastcache

Tutte le issue di VictoriaMetrics/fastcache

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.