apache / apache/jmeter

FileServer synchronisation is rather crude

Open
#2,911 0 comments 0 reactions 0 assignees View on GitHub
enhancement os: All P2
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

**Sebb** ([Bug 53815](https://bz.apache.org/bugzilla//show_bug.cgi?id=53815&redirect=false)):
FileServer needs to be synchronised to provide thread-safety.

However, the synchronisation is applied at instance level.
This is unnecessary for at least part of the time.

The files Map is mostly read, not written, so could be protected using read/write locks. A Concurrent Map would not be sufficient here, as the updates need exclusive access.

Access to a single FileEntry instance would still need to be single-threaded to prevent problems when sharing a file across multiple threads.

Making such changes should improve performance by reducing lock waits.

OS: All

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.