Skip to content

Commit

Permalink
Restore rest.resubmit_incomplete config parameter (#4970)
Browse files Browse the repository at this point in the history
For some inexplicable reason I thought `rest.resubmit_incomplete` config
variable wasn't used anymore and removed it in
#3879 .

This PR is for reverting this change.

---
TYPE: IMPROVEMENT
DESC: Restore rest.resubmit_incomplete config parameter
  • Loading branch information
ypatia authored May 14, 2024
1 parent 69028d8 commit 1129008
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/src/unit-capi-rest-dense_array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,12 @@ TEST_CASE_METHOD(
DenseArrayRESTFx,
"C API: REST Test dense array, incomplete reads",
"[capi][rest][dense][incomplete]") {
// TODO: refactor for each supported FS.
tiledb_error_t* error;
tiledb_config_t* config;
tiledb_config_alloc(&config, &error);
REQUIRE(
tiledb_config_set(config, "rest.resubmit_incomplete", "false", &error) ==
TILEDB_OK);
check_incomplete_reads();
}

Expand Down
4 changes: 4 additions & 0 deletions tiledb/api/c_api/config/config_api_external.h
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,10 @@ TILEDB_EXPORT void tiledb_config_free(tiledb_config_t** config) TILEDB_NOEXCEPT;
* Authentication token for REST server (used instead of
* username/password). <br>
* **Default**: ""
* - `rest.resubmit_incomplete` <br>
* If true, incomplete queries received from server are automatically
* resubmitted before returning to user control. <br>
* **Default**: "true"
* - `rest.ignore_ssl_validation` <br>
* Have curl ignore ssl peer and host validation for REST server. <br>
* **Default**: false
Expand Down
4 changes: 4 additions & 0 deletions tiledb/sm/cpp_api/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,10 @@ class Config {
* Authentication token for REST server (used instead of
* username/password). <br>
* **Default**: ""
* - `rest.resubmit_incomplete` <br>
* If true, incomplete queries received from server are automatically
* resubmitted before returning to user control. <br>
* **Default**: "true"
* - `rest.ignore_ssl_validation` <br>
* Have curl ignore ssl peer and host validation for REST server. <br>
* **Default**: false
Expand Down
4 changes: 4 additions & 0 deletions tiledb/sm/rest/rest_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ Status RestClient::init(
if (c_str != nullptr)
RETURN_NOT_OK(serialization_type_enum(c_str, &serialization_type_));

bool found = false;
RETURN_NOT_OK(config_->get<bool>(
"rest.resubmit_incomplete", &resubmit_incomplete_, &found));

return Status::Ok();
}

Expand Down

0 comments on commit 1129008

Please sign in to comment.