Skip to content

Automatically label PRs based on files changed#2

Merged
alamb merged 2 commits intomasterfrom
alamb/labeler
Jun 12, 2021
Merged

Automatically label PRs based on files changed#2
alamb merged 2 commits intomasterfrom
alamb/labeler

Conversation

@alamb
Copy link
Owner

@alamb alamb commented Jun 12, 2021

(testing PR against alamb/arrow-rs)

Rationale:

Locate PRs that affect various parts of the codebase to make it easier to find PRs in need of review

Changes:

  1. Add labeler action, using standard github action (https://github.com/actions/labeler)

Notes

You can see this working on https://github.com/alamb/arrow-rs (TODO link)

@alamb alamb merged commit 0cf6ef0 into master Jun 12, 2021
This was referenced Jun 12, 2021
@alamb alamb deleted the alamb/labeler branch June 13, 2021 10:55
alamb pushed a commit that referenced this pull request Mar 21, 2023
alamb pushed a commit that referenced this pull request Aug 6, 2024
separate tests that require arrow into a separate module
alamb pushed a commit that referenced this pull request Nov 25, 2024
* Implement bulk_delete_request for Azure

* Fix lint and add Azurite bug workaround

* Special 404 error case

* Clippy fix

* Make number of expected headers more conservative and better document invariants

* Use multer for multipart parsing

* Fix clippy

* Fix clippy #2

* Reuse part response buffer

* Make multer conditional to azure feature

* One more HeaderValue::from_static

* Add tests for bulk delete request building and response parsing

* Switch back to manual parsing to avoid multer dependency, other PR suggestions

* Fixes lint
alamb pushed a commit that referenced this pull request Mar 20, 2025
* Implement bulk_delete_request for Azure

* Fix lint and add Azurite bug workaround

* Special 404 error case

* Clippy fix

* Make number of expected headers more conservative and better document invariants

* Use multer for multipart parsing

* Fix clippy

* Fix clippy #2

* Reuse part response buffer

* Make multer conditional to azure feature

* One more HeaderValue::from_static

* Add tests for bulk delete request building and response parsing

* Switch back to manual parsing to avoid multer dependency, other PR suggestions

* Fixes lint
alamb pushed a commit that referenced this pull request Feb 2, 2026
# Which issue does this PR close?

small optimization

# Rationale for this change
key insight is the byte clone is cheap just a ref count compare to vec
clone is a alloc + memcopy.

before
```
let mut result = Vec::new();          // alloc #1
result.extend_from_slice(prefix);
result.extend_from_slice(suffix);

let data = Bytes::from(result.clone()); // alloc #2 + memcpy
item.set_from_bytes(data);
self.previous_value = result;          // keep Vec
```

after
```
let mut result = Vec::with_capacity(prefix_len + suffix.len()); // alloc #1
result.extend_from_slice(&self.previous_value[..prefix_len]);
result.extend_from_slice(suffix);

let data = Bytes::from(result);       // no alloc, takes Vec buffer
item.set_from_bytes(data.clone());    // cheap refcount bump
self.previous_value = data;           // move, no alloc
```

# What changes are included in this PR?
previous_value type changed to Bytes
preallocate result vec capacity.

# Are these changes tested?

the existing test should pass

# Are there any user-facing changes?

no
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.

1 participant