fix: Avoid `use_state` race conditions. Remove key argument to `use_state` by Pijukatel · Pull Request #868 · apify/crawlee-python

@Pijukatel

Remove key argument from use_state and hardcode it instead.
Add unit tests for race conditions.
Add lock when accessing the cache or kvs to prevent race conditions.

@Pijukatel added bug

Something isn't working.

t-tooling

Issues with this label are in the ownership of the tooling team.

labels

Jan 6, 2025

Pijukatel

@Pijukatel

It is pretty uggly without Barrier.

@Pijukatel Pijukatel changed the title Align Python implementation of use_state wirth JS fix!: Align Python implementation of use_state wirth JS

Jan 6, 2025

@Pijukatel Pijukatel changed the title fix!: Align Python implementation of use_state wirth JS fix: Align Python implementation of use_state wirth JS

Jan 7, 2025

@Pijukatel Pijukatel changed the title fix: Align Python implementation of use_state wirth JS fix: Avoid use_state race conditions. Remove key argument to use_state.

Jan 8, 2025

Mantisus

janbuchar

@vdusek vdusek changed the title fix: Avoid use_state race conditions. Remove key argument to use_state. fix: Avoid use_state race conditions. Remove key argument to use_state

Jan 9, 2025

vdusek

Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>

@Pijukatel

janbuchar

@Pijukatel Pijukatel deleted the align-use-state-with-JS-implementation branch

January 10, 2025 13:53