Skip to content

Conversation

@yagagagaga
Copy link
Contributor

@yagagagaga yagagagaga commented Nov 7, 2024

pick master #41037

Proposed changes

Add a http action which is useful when you debug.

API

GET /api/file_cache

request parameter

request parameter1

param type desc require
op string the value must be list_cache, other value you can refer to #40831 #37484 yes
value string the segment file name yes

request parameter2

param type desc require
op string the value must be clear, other value you can refer to #40831 #37484 yes
value string the segment file name yes
sync bool clean local cache in sync no

response

response1

if success

param type desc
array return the segment file cache in local path

if fail

param type desc
array empty array

response2

if success

param type desc
status string
msg string

example

case 1

curl  '172.100.0.4:8040/api/file_cache?op=list_cache&value=0200000000000001bf42c14374fff491ffb7c89a1a65c5bb_0.dat'

return

["/opt/doris/be/file_cache/c6a/c6a599f453f67f0949f80ad9990fa3dd/0"]

case 2

curl '127.0.0.1:8040/api/file_cache?op=clear&sync=true&value=0200000000000001284b68fea3dcfe8a83e65cd88426b081_0.dat'

return

{
    "status": "OK",
    "msg": "OK"
}

(cherry picked from commit 99d0748)

What problem does this PR solve?

Issue Number: close #xxx

Related PR: cherry-pick #41037

Problem Summary:

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No colde files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.
  • Release note

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

…ache#41037)

## Proposed changes

Add a http action which is useful when you debug.

### API
```http
GET /api/file_cache
```

### request parameter

#### request parameter1

|param|type|desc|require|
|:---|:---|:---|:---|
|op|string|the value must be `list_cache`, other value you can refer to
apache#40831 apache#37484 |yes|
|value|string|the segment file name |yes|

#### request parameter2

|param|type|desc|require|
|:---|:---|:---|:---|
|op|string|the value must be `clear`, other value you can refer to
apache#40831 apache#37484 |yes|
|value|string|the segment file name |yes|
|sync|bool|clean local cache in sync |no|

### response

#### response1

if success
|param|type|desc|
|:---|:---|:---|
||array|return the segment file cache in local path|

if fail
|param|type|desc|
|:---|:---|:---|
||array|empty array|

#### response2

if success
|param|type|desc|
|:---|:---|:---|
|status|string||
|msg|string||

### example

#### case 1

```bash
curl  '172.100.0.4:8040/api/file_cache?op=list_cache&value=0200000000000001bf42c14374fff491ffb7c89a1a65c5bb_0.dat'
```

return
```json
["/opt/doris/be/file_cache/c6a/c6a599f453f67f0949f80ad9990fa3dd/0"]
```

#### case 2

```bash
curl '127.0.0.1:8040/api/file_cache?op=clear&sync=true&value=0200000000000001284b68fea3dcfe8a83e65cd88426b081_0.dat'
```

return
```json
{
    "status": "OK",
    "msg": "OK"
}
```

(cherry picked from commit 99d0748)
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@yagagagaga
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2024

clang-tidy review says "All clean, LGTM! 👍"

@yagagagaga
Copy link
Contributor Author

run p0

@yagagagaga
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2024

clang-tidy review says "All clean, LGTM! 👍"

@yagagagaga
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2024

clang-tidy review says "All clean, LGTM! 👍"

@gavinchou gavinchou merged commit 098b66e into apache:branch-3.0 Nov 14, 2024
@gavinchou gavinchou mentioned this pull request Nov 26, 2024
@yagagagaga yagagagaga deleted the pick-41037 branch February 25, 2025 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants