Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

safe copy in local pinot fs #14883

Merged
merged 18 commits into from
Jan 24, 2025
Merged

Conversation

jasperjiaguo
Copy link
Contributor

@jasperjiaguo jasperjiaguo commented Jan 22, 2025

Fix the issue described in #14869

This code introduces some overhead, mainly in calculating CRC 32 for the files.

copy the src file into a temp file in the same folder as the dst file
rename dst file in deep store (iff the old file exists) to a backup file
rename the temp file to the dst file
delete the backup file (iff the old file exists)

update Jan 23:
did more analysis the crc would not work on our largest data set, the data is too much for the controller to handle. (per 500mb segment takes 2 sec to generate crc in bandwidth limited deep store)

@codecov-commenter
Copy link

codecov-commenter commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 76.66667% with 7 lines in your changes missing coverage. Please review.

Project coverage is 63.71%. Comparing base (59551e4) to head (3c0991c).
Report is 1618 commits behind head on master.

Files with missing lines Patch % Lines
.../org/apache/pinot/spi/filesystem/LocalPinotFS.java 76.66% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #14883      +/-   ##
============================================
+ Coverage     61.75%   63.71%   +1.96%     
- Complexity      207     1470    +1263     
============================================
  Files          2436     2708     +272     
  Lines        133233   151510   +18277     
  Branches      20636    23391    +2755     
============================================
+ Hits          82274    96541   +14267     
- Misses        44911    47712    +2801     
- Partials       6048     7257    +1209     
Flag Coverage Δ
custom-integration1 100.00% <ø> (+99.99%) ⬆️
integration 100.00% <ø> (+99.99%) ⬆️
integration1 100.00% <ø> (+99.99%) ⬆️
integration2 0.00% <ø> (ø)
java-11 63.69% <76.66%> (+1.98%) ⬆️
java-21 63.61% <76.66%> (+1.99%) ⬆️
skip-bytebuffers-false 63.71% <76.66%> (+1.96%) ⬆️
skip-bytebuffers-true 63.59% <76.66%> (+35.87%) ⬆️
temurin 63.71% <76.66%> (+1.96%) ⬆️
unittests 63.71% <76.66%> (+1.96%) ⬆️
unittests1 56.30% <76.66%> (+9.40%) ⬆️
unittests2 34.00% <40.00%> (+6.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jasperjiaguo jasperjiaguo marked this pull request as ready for review January 23, 2025 01:12
@jasperjiaguo jasperjiaguo merged commit e0ec848 into apache:master Jan 24, 2025
21 checks passed
gortiz pushed a commit to gortiz/pinot that referenced this pull request Jan 30, 2025
* safe copy in local pinot fs

* make suffix a constant

* fix backup del

* add restoration

* format

* code style

* address comments

* address comments

* add special exception

* add special exception

* copy to tmp file and rename

* use a backup file and delete it

* refactoring

* refactoring

* refactoring

* remove crc

* remove crc

* refactor time stamp
jtao15 pushed a commit that referenced this pull request Jan 31, 2025
* safe copy in local pinot fs

* make suffix a constant

* fix backup del

* add restoration

* format

* code style

* address comments

* address comments

* add special exception

* add special exception

* copy to tmp file and rename

* use a backup file and delete it

* refactoring

* refactoring

* refactoring

* remove crc

* remove crc

* refactor time stamp
zeronerdzerogeekzerocool pushed a commit to zeronerdzerogeekzerocool/pinot that referenced this pull request Feb 20, 2025
* safe copy in local pinot fs

* make suffix a constant

* fix backup del

* add restoration

* format

* code style

* address comments

* address comments

* add special exception

* add special exception

* copy to tmp file and rename

* use a backup file and delete it

* refactoring

* refactoring

* refactoring

* remove crc

* remove crc

* refactor time stamp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants