Skip to content

Began working on adding DIR futures#138

Merged
marcoSanti merged 13 commits intocapio-v2from
directory-streaming
Jun 11, 2025
Merged

Began working on adding DIR futures#138
marcoSanti merged 13 commits intocapio-v2from
directory-streaming

Conversation

@marcoSanti
Copy link
Copy Markdown
Member

This commit adds the capability of performing streaming on contents of directory when the readdir and readdir64 glibc methods are invoked. Contrary to other POSIX handlers, here we patch directly methods from the glibc instead of system calls, trough the linux loader

Marco Edoardo Santimaria added 12 commits June 4, 2025 12:03
Added patches to dirent.h defined functions
Now readdir works. I need to return NULL as soon as the directory is
committed. Ask for committmenet on directory from capio server
This commit changes the behaviour of posix component and server
component of listdir. When called, it no longer directly asks if a file
is committed, but asks for the commit token path. It then caches it, and
periodically checks if said token exists. as soon as it does, it returns
NULL, as specified by the POSIX semantic for listdir||()
added missing errno, and fixed return value when doing directory
streaming
@marcoSanti marcoSanti force-pushed the directory-streaming branch from 741cfdb to 571c77b Compare June 11, 2025 13:30
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 11, 2025

Codecov Report

Attention: Patch coverage is 12.14286% with 246 lines in your changes missing coverage. Please review.

Project coverage is 48.71%. Comparing base (dfa05a2) to head (1731b82).
Report is 14 commits behind head on capio-v2.

Files with missing lines Patch % Lines
src/posix/handlers/posix_readdir.hpp 0.00% 116 Missing and 86 partials ⚠️
src/server/file-manager/file_manager_impl.hpp 40.74% 7 Missing and 9 partials ⚠️
src/posix/utils/requests.hpp 0.00% 4 Missing and 7 partials ⚠️
...c/server/client-manager/handlers/posix_readdir.hpp 0.00% 3 Missing and 5 partials ⚠️
src/server/capio-cl-engine/capio_cl_engine.hpp 50.00% 3 Missing and 3 partials ⚠️
...c/server/storage-service/capio_storage_service.hpp 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           capio-v2     #138      +/-   ##
============================================
- Coverage     51.50%   48.71%   -2.80%     
============================================
  Files            71       73       +2     
  Lines          3652     3929     +277     
  Branches       2111     2264     +153     
============================================
+ Hits           1881     1914      +33     
- Misses          844      977     +133     
- Partials        927     1038     +111     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marcoSanti marcoSanti merged commit 0238be9 into capio-v2 Jun 11, 2025
28 checks passed
@marcoSanti marcoSanti deleted the directory-streaming branch June 11, 2025 14:02
marcoSanti pushed a commit that referenced this pull request Jun 22, 2025
This commit adds the feature to stream the content of directories, by
providing streaming options when issuing a posix readdir() method call.
It returns a new dirent entry as long as the directory itself is not
committed.

- Added patches to dirent.h defined functions
- Fixed readdir. add commit return Now readdir works.
  I need to return NULL as soon as the directory is
  committed. Ask for committmenet on directory from capio server
- This commit changes the behaviour of posix component and server
  component of listdir. When called, it no longer directly asks if a file
  is committed, but asks for the commit token path. It then caches it, and
  periodically checks if said token exists. as soon as it does, it returns
  NULL, as specified by the POSIX semantic for listdir||()
- added missing errno, and fixed return value when doing directory
  streaming
marcoSanti pushed a commit that referenced this pull request Jun 22, 2025
This commit adds the feature to stream the content of directories, by
providing streaming options when issuing a posix readdir() method call.
It returns a new dirent entry as long as the directory itself is not
committed.

- Added patches to dirent.h defined functions
- Fixed readdir. add commit return Now readdir works.
  I need to return NULL as soon as the directory is
  committed. Ask for committmenet on directory from capio server
- This commit changes the behaviour of posix component and server
  component of listdir. When called, it no longer directly asks if a file
  is committed, but asks for the commit token path. It then caches it, and
  periodically checks if said token exists. as soon as it does, it returns
  NULL, as specified by the POSIX semantic for listdir||()
- added missing errno, and fixed return value when doing directory
  streaming
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