Elaborate time to live and max idle in documentation

Aperta
#507 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Inizia dalla documentazione dell'API Map.put del client Python collegata nell'issue e rivedi le descrizioni esistenti di ttl e max_idle. Usa come riferimenti la formulazione dell'API Node.js e la documentazione collegata sulla configurazione della mappa; il lavoro è completato quando la documentazione Python spiega quando viene reimpostato ciascun valore e come si comportano zero o i valori predefiniti della configurazione.

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

Descrizione

Type: Documentation

Right now in python client docs we say this about ttl and max idle:

ttl (int) – Maximum time in seconds for this entry to stay in the map. If not provided, the value configured on the server side configuration will be used. Setting this to 0 means infinite time-to-live.

max_idle (int) – Maximum time in seconds for this entry to stay idle in the map. If not provided, the value configured on the server side configuration will be used. Setting this to 0 means infinite max idle time.

as can be found here:

https://hazelcast.readthedocs.io/en/stable/api/proxy/map.html?highlight=map#hazelcast.proxy.map.Map.put

A community user asked this in slack:

Hi, Can any one tell me if it possible to update a map and keep the original TTL that was set when it was created?

I understood it as he is asking if he can reset ttl to its first value when updating an entry, but it is the default behaviour already. See this section: https://docs.hazelcast.com/cloud/map-configurations.html#time-to-live

In Node.js client we have this explanation in the apidocs:

The entry will expire and get evicted after the TTL. It limits the lifetime of the entries relative to the time of the last write access performed on them. If the TTL is 0, then the entry lives forever. If the TTL is negative, then the TTL from the map configuration will be used (default: forever).

The entry will expire and get evicted after the Max Idle time. It limits the lifetime of the entries relative to the time of the last read or write access performed on them. If the Max Idle is 0, then the entry lives forever. If the Max Idle is negative, then the Max Idle from the map configuration will be used (default: forever). The time precision is limited by 1 second. The Max Idle that is less than 1 second can lead to unexpected behaviour.

which explains when ttl and max idle's are reset.

We should have more detail in python version too, at least we should mention when ttl and max idle reset.

Lingua principale
Python
Stelle
115
Fork
78
Merge medio
2g 23h
PR unite (30g)
2

Preparare l'ambiente

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 hazelcast/hazelcast-python-client

Tutte le issue di hazelcast/hazelcast-python-client

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.