Skip to content

Bug: [Session] Redis session lock error #4391

@kenjis

Description

@kenjis

Describe the bug
Multiple Ajax communications at the same time sometimes result in session errors.
In rare cases, a key is created by another process between the time the $ttl is retrieved and the time the key is set.

Reported: (Japanese) https://groups.google.com/g/codeigniter_jp/c/h65Q7KZtDN4/m/Ef_Vl8DmAAAJ.

CodeIgniter 4 version
develop branch (after 4.1.1)

Affected module(s)
Session RedisHandler

Expected behavior
Use setnx to acquire the lock.
If it fails, retry after some time.

Ref bcit-ci/CodeIgniter#5382

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix them

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions