Skip to content

Commit

Permalink
[#328] Rename config option to better express intent.
Browse files Browse the repository at this point in the history
  • Loading branch information
korydraughn authored and alanking committed Aug 23, 2024
1 parent 01f2901 commit 514e7ea
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,9 @@ Notice how some of the configuration values are wrapped in angle brackets (e.g.
// during a single read operation.
"max_number_of_bytes_per_read_operation": 8192,

// The buffer size used for write operations.
"buffer_size_in_bytes_for_write_operations": 8192,
// The maximum number of bytes that can be written to a data object
// during a single write operation.
"max_number_of_bytes_per_write_operation": 8192,

// The number of rows that can be returned by a General or Specific
// query. If the client specifies a number greater than the value
Expand Down
6 changes: 3 additions & 3 deletions core/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ constexpr auto default_jsonschema() -> std::string_view
"type": "integer",
"minimum": 1
}},
"buffer_size_in_bytes_for_write_operations": {{
"max_number_of_bytes_per_write_operation": {{
"type": "integer",
"minimum": 1
}},
Expand All @@ -492,7 +492,7 @@ constexpr auto default_jsonschema() -> std::string_view
"connection_pool",
"max_number_of_parallel_write_streams",
"max_number_of_bytes_per_read_operation",
"buffer_size_in_bytes_for_write_operations",
"max_number_of_bytes_per_write_operation",
"max_number_of_rows_per_catalog_query"
]
}}
Expand Down Expand Up @@ -580,7 +580,7 @@ auto print_configuration_template() -> void
"max_number_of_parallel_write_streams": 3,
"max_number_of_bytes_per_read_operation": 8192,
"buffer_size_in_bytes_for_write_operations": 8192,
"max_number_of_bytes_per_write_operation": 8192,
"max_number_of_rows_per_catalog_query": 15
}}
Expand Down
2 changes: 1 addition & 1 deletion endpoints/data_objects/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ namespace

static const auto max_number_of_bytes_per_write =
irods::http::globals::configuration()
.at(json::json_pointer{"/irods_client/buffer_size_in_bytes_for_write_operations"})
.at(json::json_pointer{"/irods_client/max_number_of_bytes_per_write_operation"})
.get<std::int64_t>();

// clang-format off
Expand Down
4 changes: 2 additions & 2 deletions test/test_irods_http_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ def test_parallel_writes(self):

def test_parallel_writes_with_data_exceeding_internal_write_threshold(self):
# This test assumes the HTTP API is configured to use a value smaller than
# 96kb for "/irods_client/buffer_size_in_bytes_for_write_operations". This is
# 96kb for "/irods_client/max_number_of_bytes_per_write_operation". This is
# important because values greater than or equal to 96kb will result in the
# background thread pool only being used one time. This test is designed to
# force the HTTP API to schedule multiple writes across the thread pool.
Expand Down Expand Up @@ -1766,7 +1766,7 @@ def test_parallel_writes_with_data_exceeding_internal_write_threshold(self):

def test_non_parallel_writes_with_data_exceeding_internal_write_threshold(self):
# This test assumes the HTTP API is configured to use a value smaller than
# 64kb for "/irods_client/buffer_size_in_bytes_for_write_operations". This is
# 64kb for "/irods_client/max_number_of_bytes_per_write_operation". This is
# important because values greater than or equal to 64kb will result in the
# background thread pool only being used one time. This test is designed to
# force the HTTP API to schedule multiple writes across the thread pool.
Expand Down

0 comments on commit 514e7ea

Please sign in to comment.