Elaborate time to live and max idle in documentation

Offen
#507 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
55/100
Issue-Typ
Dokumentation
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
documentation

Rechercherichtung

Beginne mit der im Issue verlinkten Dokumentation zur Map.put API des Python-Clients und überprüfe die vorhandenen Beschreibungen von ttl und max_idle. Verwende die Formulierung der Node.js API und die verlinkte Dokumentation zur Map-Konfiguration als Referenzen; als abgeschlossen gilt die Aufgabe, wenn die Python-Dokumentation erklärt, wann jeder Wert zurückgesetzt wird und wie sich null oder Konfigurationsstandardwerte verhalten.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
Python
Sterne
115
Forks
78
Ø Merge
2 T. 23 Std.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus hazelcast/hazelcast-python-client

Alle Issues in hazelcast/hazelcast-python-client

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.