apache / apache/jmeter

JDBC sampler : Add hashing of Data to avoid storing all output into memory when result is arbitrarily large

Open
#1,896 18 comments 0 reactions 0 assignees View on GitHub
enhancement keyword: PatchAvailable need info os: All P1
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

**Nathan Bryant** ([Bug 41921](https://bz.apache.org/bugzilla//show_bug.cgi?id=41921&redirect=false)):
JDBCSampler (and I presume other samplers) store all the output received from
their test action. example:

Data data = getDataFromResultSet(rs);
res.setResponseData(data.toString().getBytes());

This is poor software design because the data could be arbitrarily large and
fill memory. It is causing OutOfMemoryErrors for us, even with not very many
threads. This is major or even critical because it prevents JMeter from being
used to generate significant load. All samplers should be rewritten to just
build an MD5 hash iteratively. The hash should be updated one buffer or row at a
time instead of in bulk.

OS: All

Contributor guide

Open the contributing guide

Research direction

Start with JDBCSampler and the getDataFromResultSet flow described in the issue, including res.setResponseData. Trace how result data is accumulated and identify the affected samplers; done means large results no longer require storing all output in memory and are processed incrementally into an MD5 hash.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.