Skip to content

Created files for Afrikaans locale (af_ZA) - #75

Merged
eldadfux merged 4 commits into
appwrite:masterfrom
Carike:master
Oct 4, 2019
Merged

eldadfux merged 4 commits into
appwrite:masterfrom
Carike:master

Conversation

@Carike

@Carike Carike commented Oct 1, 2019

Copy link
Copy Markdown
Contributor

I have created and updated the relevant language files for the Afrikaans language (af_ZA) from South Africa for the issue:

#25 Help Translate Appwrite Locale and Email templates

Hacktoberfest 2019 is in full swing!

@eldadfux eldadfux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Carike please remove the 2 extra files so I will be able to merge changes.

.suo
slnx.sqlite

Thanks!

Carike added 2 commits October 3, 2019 16:37
Not required
@Carike
Carike requested a review from eldadfux October 3, 2019 14:50

@eldadfux eldadfux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@eldadfux
eldadfux merged commit 3da9fa3 into appwrite:master Oct 4, 2019
@eldadfux

eldadfux commented Oct 4, 2019

Copy link
Copy Markdown
Member

THANK YOU! All changes merged 🥳

Please reach out to me on Gitter if you would like me to send you some cool Appwrite stickers and magnets!

NancyWei123 pushed a commit to NancyWei123/appwrite that referenced this pull request Sep 23, 2026
…ed-connections

fix(pools): recover failed pool connections
NancyWei123 pushed a commit to NancyWei123/appwrite that referenced this pull request Sep 24, 2026
NancyWei123 pushed a commit to NancyWei123/appwrite that referenced this pull request Sep 24, 2026
…op stale Lua docblock

Addresses review on appwrite#75:
- Pool::getGeneration()/saveWithLease() no longer blindly delegate; they guard
  with `instanceof Leasable` (mirroring Sharding) and fall back to '0' /
  unconditional save(), so a pool holding a non-Leasable adapter (Filesystem,
  Memory, Memcached, None, ...) no longer triggers a "Call to undefined method"
  fatal. Covered by a new PoolTest case (the pool there holds Filesystem).
- Remove the stale `ARGV[4]=generation ttl seconds` line from the
  LUA_SAVE_WITH_LEASE docblock; the save script takes only ARGV[1..3].

Co-Authored-By: Claude Opus 4.8 <[email protected]>
NancyWei123 pushed a commit to NancyWei123/appwrite that referenced this pull request Sep 24, 2026
…n, reserved key, decorator support

Second review round on appwrite#75:
- Generation marker no longer expires (was 1d TTL). A long-TTL reader whose
  marker expired before saveWithLease() could have a stale write accepted; the
  marker must outlive any reader, so it persists.
- purge() returns the DEL result again (number of value keys removed), not the
  INCR, preserving the documented false-for-missing-key semantics.
- Generation markers use a reserved key prefix (`_utopia_cache_gen:`) instead of
  a `:__gen` suffix, so they cannot collide with a real cache entry (a hash) and
  cause WRONGTYPE errors.
- CircuitBreaker now implements Leasable and delegates to the wrapped adapter,
  so a CircuitBreaker-wrapped Redis keeps lease semantics instead of silently
  falling back to an unconditional save.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
NancyWei123 pushed a commit to NancyWei123/appwrite that referenced this pull request Sep 24, 2026
Third review round on appwrite#75: the persisted generation markers were counted by
getSize() (which returns Redis DBSIZE), so a purge could leave getSize()
non-zero after the value was gone, and purging absent keys inflated it.

getSize() now subtracts the generation namespace (SCAN over the reserved
prefix) so it reports only real cache entries. The generation bump stays
unconditional on purge — a reader may have read a row the writer is now
deleting before anything was cached, so the generation must advance even when
DEL removed nothing (skipping it reintroduced a stale-write window, caught by
the existing lease test). Covered by a new size test.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
NancyWei123 pushed a commit to NancyWei123/appwrite that referenced this pull request Sep 24, 2026
…a sidecar key

Alternative to the sidecar-key generation in appwrite#75, for comparison. The generation
lives in a reserved field (`__utopia_gen__`) inside the value's own hash, so
every lease op is single-key:
- saveWithLease / purge are single-key Lua scripts → one shard → correct under
  Redis Cluster and multi-threaded backends (Dragonfly) with no cross-shard span.
- No sidecar key → deletes the reserved-prefix collision handling and the
  getSize() prefix-scan exclusion entirely.

Interface is unchanged (same getGeneration + saveWithLease).

Trade-offs vs the sidecar approach:
- getSize() can no longer cleanly exclude the generation: a purged key keeps a
  tiny gen-only hash until re-cached, so DBSIZE slightly over-counts
  purged-but-not-yet-recached keys (filtering would need an O(N) scan).
- purge() does a small HLEN/HEXISTS dance to keep "true iff a value was removed".

Co-Authored-By: Claude Opus 4.8 <[email protected]>
NancyWei123 pushed a commit to NancyWei123/appwrite that referenced this pull request Sep 24, 2026
…erations

Review on appwrite#75 (in-hash generation): the generation lives in a reserved field
(__utopia_gen__) inside the value's own hash, but callers can address any field
via load/save/touch/purge. A caller writing under that field would overwrite the
generation with a cache envelope; the next purge then read a non-numeric value,
fell back through `tonumber(current) or 0`, and reset the generation — reviving
stale lease tokens.

Reject the reserved field on every public field path (load/save/saveWithLease/
touch/purge-with-hash) so it can't be read, written, or deleted by callers, and
can only be managed by the lease scripts. Covered by a regression test.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
NancyWei123 pushed a commit to NancyWei123/appwrite that referenced this pull request Sep 24, 2026
Review on appwrite#75: purge($key, $hash) only ran HDEL on the field and left the
per-key generation untouched, so the lease was bypassed for hashed entries — a
reader could capture the generation, a concurrent field-purge would delete the
field without advancing the generation, and the reader's saveWithLease(...,
$hash, capturedGeneration) would still pass the CAS and re-cache stale data.

Field-level purge now deletes the field and advances the generation in one
single-key Lua step (LUA_PURGE_FIELD), mirroring the full-purge bump, while
preserving purge()'s deletion-result return. Over-invalidating sibling fields of
the same key is safe: it only costs cache misses, never staleness. Covered by a
regression test.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
NancyWei123 pushed a commit to NancyWei123/appwrite that referenced this pull request Sep 24, 2026
feat(cache): Leasable primitive to close the cache-aside read-after-write race
NancyWei123 pushed a commit to NancyWei123/appwrite that referenced this pull request Sep 25, 2026
NancyWei123 pushed a commit to NancyWei123/appwrite that referenced this pull request Sep 28, 2026
NancyWei123 pushed a commit to NancyWei123/appwrite that referenced this pull request Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants