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

Fileserver Cache Improvements #9006

Merged
merged 6 commits into from May 21, 2024
Merged

Fileserver Cache Improvements #9006

merged 6 commits into from May 21, 2024

Conversation

Ashod
Copy link
Contributor

@Ashod Ashod commented May 8, 2024

Reuses file-reading utility, handles errors during compression better (always inserts an uncompressed version of each file and serves it if the compressed version is missing), reduces memory allocation/copying churn, deletes dead code, and adds comments. (Commit log messages have the details.)

  • wsd: FileServer cleanup
  • wsd: refactored readFile to take buffer
  • wsd: generic readFile
  • wsd: simplify file-server caching
  • wsd: fileserver: better compression failure handling
  • wsd: remove unused (Is)ViewWithCommentsFileExtension(s)

@Ashod Ashod changed the title private/ash/fileserving Fileserving and Compressing May 8, 2024
@Ashod Ashod changed the title Fileserving and Compressing Fileserver Cache Improvements May 8, 2024
Copy link
Contributor

@mmeeks mmeeks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me modulo re-basing for CI =) Thanks Ash.

@Ashod Ashod force-pushed the private/ash/fileserving branch 5 times, most recently from 9662d64 to 8c02ba6 Compare May 16, 2024 00:33
@Ashod Ashod force-pushed the private/ash/fileserving branch 3 times, most recently from 2bd6c4c to 439f658 Compare May 20, 2024 12:50
Ashod added 4 commits May 20, 2024 18:04
Change-Id: I4ebdbee733922be312a7a5b9b59bcb6c6329a06b
Signed-off-by: Ashod Nakashian <[email protected]>
Change-Id: I31a76e25cff150bcf33d503e6ed9b7fae0e0ed42
Signed-off-by: Ashod Nakashian <[email protected]>
Change-Id: I7b4328785399a2601193d71b5d6f5d1c9f933bfb
Signed-off-by: Ashod Nakashian <[email protected]>
This removes explicit file-reading logic
with the existing utility function that
is more robust and avoid the C++ streaming
abstractions altogether.

Change-Id: I170b8497a4f9185f1b29e632da27a3520ca0347a
Signed-off-by: Ashod Nakashian <[email protected]>
@Ashod Ashod force-pushed the private/ash/fileserving branch 2 times, most recently from 0b6e1fc to 0dc551b Compare May 20, 2024 22:21
Ashod added 2 commits May 21, 2024 01:26
We now always cache the uncompressed file data even
when compressing fails. If no compressed data exists,
we return the uncompressed version.

Change-Id: I885275dac526f4d47ea74d6badcb609390e7c139
Signed-off-by: Ashod Nakashian <[email protected]>
Change-Id: I25158862746ce6a3e4ee16ff9d661ec96810ce24
Signed-off-by: Ashod Nakashian <[email protected]>
@timar timar closed this May 21, 2024
@timar timar reopened this May 21, 2024
@Ashod Ashod merged commit f1001cd into master May 21, 2024
17 checks passed
@Ashod Ashod deleted the private/ash/fileserving branch May 21, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants