Skip to content

Commit

Permalink
Merge branch 'quickwit-oss:main' into add-time-series-dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
kuzaxak committed May 22, 2024
2 parents a10ad64 + ec502f0 commit 261e151
Show file tree
Hide file tree
Showing 12 changed files with 164 additions and 123 deletions.
1 change: 0 additions & 1 deletion distribution/ecs/quickwit/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ data "aws_iam_policy_document" "quickwit_task_permission" {
statement {
actions = [
"s3:ListBucket",
"s3:ListObjects",
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
Expand Down
6 changes: 3 additions & 3 deletions docs/configuration/node-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,16 @@ This section contains the configuration options for a Searcher.
| `partial_request_cache_capacity` | Partial request in memory cache capacity on a Searcher. Cache intermediate state for a request, possibly making subsequent requests faster. It can be disabled by setting the size to `0`. | `64M` |
| `max_num_concurrent_split_searches` | Maximum number of concurrent split search requests running on a Searcher. | `100` |
| `max_num_concurrent_split_streams` | Maximum number of concurrent split stream requests running on a Searcher. | `100` |
| `split_cache` | Searcher split cache configuration options defined in the section below. | |
| `split_cache` | Searcher split cache configuration options defined in the section below. Cache disabled if unspecified. | |


### Searcher split cache configuration

This section contains the configuration options for the searcher split cache.
This section contains the configuration options for the on disk searcher split cache.

| Property | Description | Default value |
| --- | --- | --- |
| `max_num_bytes` | Maximum size in bytes allowed in the split cache. | `1G` |
| `max_num_bytes` | Maximum disk size in bytes allowed in the split cache. Can be exceeded by the size of one split. | |
| `max_num_splits` | Maximum number of splits allowed in the split cache. | `10000` |
| `num_concurrent_downloads` | Maximum number of concurrent download of splits. | `1` |

Expand Down
14 changes: 6 additions & 8 deletions docs/guides/aws-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ AWS credentials or region resolution may take a few seconds, especially if the A

Required authorized actions:
- `ListBucket` (on the bucket directly)
- `AbortMultipartUpload`
- `DeleteObject`
- `GetObject`
- `ListMultipartUploadParts`
- `ListObjects`
- `PutObject`
- `DeleteObject`
- `ListMultipartUploadParts`
- `AbortMultipartUpload`

Here is an example of a bucket policy:
```json
Expand All @@ -70,12 +69,11 @@ Here is an example of a bucket policy:
{
"Effect": "Allow",
"Action": [
"s3:AbortMultipartUpload",
"s3:DeleteObject",
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject",
"s3:ListMultipartUploadParts",
"S3:ListObjects",
"s3:PutObject"
"s3:AbortMultipartUpload"
],
"Resource": [
"arn:aws:s3:::my-bucket/*"
Expand Down
4 changes: 2 additions & 2 deletions quickwit/quickwit-serve/src/elasticsearch_api/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub(crate) fn elasticsearch_filter(
pub(crate) fn elastic_bulk_filter(
) -> impl Filter<Extract = (Body, ElasticBulkOptions), Error = Rejection> + Clone {
warp::path!("_elastic" / "_bulk")
.and(warp::post())
.and(warp::post().or(warp::put()).unify())
.and(warp::body::content_length_limit(
CONTENT_LENGTH_LIMIT.as_u64(),
))
Expand All @@ -97,7 +97,7 @@ pub(crate) fn elastic_bulk_filter(
pub(crate) fn elastic_index_bulk_filter(
) -> impl Filter<Extract = (String, Body, ElasticBulkOptions), Error = Rejection> + Clone {
warp::path!("_elastic" / String / "_bulk")
.and(warp::post())
.and(warp::post().or(warp::put()).unify())
.and(warp::body::content_length_limit(
CONTENT_LENGTH_LIMIT.as_u64(),
))
Expand Down
7 changes: 4 additions & 3 deletions quickwit/quickwit-storage/src/split_cache/split_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ pub struct SplitInfo {
/// - downloading_splits
/// - candidate_splits.
///
/// It is possible for the split table to exceed its limits, by at most one split.
/// It is possible for the split table size in bytes to exceed its limits, by at
/// most one split.
pub struct SplitTable {
on_disk_splits: BTreeSet<SplitKey>,
downloading_splits: BTreeSet<SplitKey>,
Expand Down Expand Up @@ -360,7 +361,7 @@ impl SplitTable {
return false;
}
if self.on_disk_splits.len() + self.downloading_splits.len()
> self.limits.max_num_splits.get() as usize
>= self.limits.max_num_splits.get() as usize
{
return true;
}
Expand Down Expand Up @@ -608,7 +609,7 @@ mod tests {
splits_to_delete,
split_to_download,
} = split_table.find_download_opportunity().unwrap();
assert_eq!(&splits_to_delete[..], &[splits[0].0][..]);
assert_eq!(&splits_to_delete[..], &[splits[0].0, splits[1].0]);
assert_eq!(split_to_download.split_ulid, new_ulid);
}

Expand Down
206 changes: 102 additions & 104 deletions quickwit/rest-api-tests/Pipfile.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
method: PUT
ndjson:
- index: { "_index": "test-index", "_id": "1" }
- message: Hello, World!
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Delete possibly remaining index
method: DELETE
endpoint: test-index
status_code: null
---
method: PUT
endpoint: test-index
json: {
"mappings": {
"properties": {
"message": {
"type": "text",
"store": true
}
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Delete possibly remaining index
method: DELETE
api_root: http://localhost:7280/api/v1/
endpoint: indexes/test-index
status_code: null
---
method: POST
api_root: http://localhost:7280/api/v1/
endpoint: indexes/
json:
version: "0.7"
index_id: test-index
doc_mapping:
field_mappings:
- name: message
type: text
sleep_after: 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
method: DELETE
endpoint: test-index
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
method: DELETE
api_root: http://localhost:7280/api/v1/
endpoint: indexes/test-index
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# # Delete index
# method: DELETE
# endpoint: indexes/simple
method: DELETE
endpoint: indexes/sortorder

0 comments on commit 261e151

Please sign in to comment.