Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion modules/dmrpp_module/Chunk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
BESDEBUG(MODULE, prolog << "BEGIN " << endl);
size_t nbytes = size * nmemb;
auto chunk = reinterpret_cast<Chunk *>(data);

//cerr<<"coming to chunk_write_data"<<endl;

Check warning on line 155 in modules/dmrpp_module/Chunk.cc

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove the commented out code.

See more on https://sonarcloud.io/project/issues?id=opendap-bes-modules&issues=AaCBTJThVYvxjwHbxved&open=AaCBTJThVYvxjwHbxved&pullRequest=1426

auto data_url = chunk->get_data_url();
BESDEBUG(MODULE, prolog << "chunk->get_data_url():" << data_url << endl);
Expand Down Expand Up @@ -189,6 +189,8 @@
// | bytes_read

unsigned long long bytes_read = chunk->get_bytes_read();
//cerr<<"bytes_read: "<<bytes_read<<endl;
//cerr<<"nbytes: "<<nbytes <<endl;

Check warning on line 193 in modules/dmrpp_module/Chunk.cc

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove the commented out code.

See more on https://sonarcloud.io/project/issues?id=opendap-bes-modules&issues=AaCBTJThVYvxjwHbxvee&open=AaCBTJThVYvxjwHbxvee&pullRequest=1426

// If this fails, the code will write beyond the buffer.
if (bytes_read + nbytes > chunk->get_rbuf_size()) {
Expand Down
1 change: 1 addition & 0 deletions modules/dmrpp_module/CurlHandlePool.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@

public:
dmrpp_easy_handle();
CURL * get_curl_handle() { return d_handle;}

Check failure on line 60 in modules/dmrpp_module/CurlHandlePool.h

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace this use of "void *" with a more meaningful type.

See more on https://sonarcloud.io/project/issues?id=opendap-bes-modules&issues=AaBY3ya3DXPyo3Qeum1i&open=AaBY3ya3DXPyo3Qeum1i&pullRequest=1426

~dmrpp_easy_handle();

Expand Down
7 changes: 5 additions & 2 deletions modules/dmrpp_module/DMZ.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ void DMZ::set_up_direct_io_flag_phase_2(D4Group * grp, BaseType *btp) {
if (!chunk_less_dim)
return;

// Another special case is that some chunks are only filled with the fvalues. This case cannot be handled by direct IO.
// Another special case is that some chunks are only filled with the fvalues. This case can be conditionally supported, so need to check.
// First calculate the number of logical chunks.
// Also up to this step, the size of chunk_dim_sizes must be the same as the size of dim_sizes. No need to double check.

Expand All @@ -1072,10 +1072,13 @@ void DMZ::set_up_direct_io_flag_phase_2(D4Group * grp, BaseType *btp) {
has_filled_chunks = true;

// Filled chunks can be supported for the whole variable case. However, we also need to check if _FillValue attribute is
// defined in this variable.
// defined in this variable. This works since in fileout netCDF, NC_NOFILL is set. So for DIO, we don't need to care about
// the data values in those filled chunks.
if (has_filled_chunks) {

BESDEBUG(PARSER, prolog << "has_filled_chunks: " <<btp->name() << endl);
// To be consistent with the current dmrpp's fillvalue handling, check if the _FillValue attribute exists.

if (btp->attributes()->find("_FillValue")==nullptr)
return;
}
Expand Down
Loading