Commit c35f1c2
committed
Suggested patch edits the polar_drop_log_page_cache function.
In particular:
- an early return is added when open() fails to avoid calling
fadvise()/close() on an invalid fd.
- platform specific posix_fadvise() call was replaced with
appropriate polar_posix_fadvise() call. The invocation is
guarded with directives USE_POSIX_FADVISE and POSIX_FADV_DONTNEED.
Falls back to no-op when the call is unavailable. This aligns
the function's behavior with existing PolarDB practice in fd.c,
xlog.c, etc.
- the polar_fd.h header file was included to make the
polar_posix_fadvise() function available.1 parent 56d2eca commit c35f1c2
1 file changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
2092 | 2093 | | |
2093 | 2094 | | |
2094 | 2095 | | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
2095 | 2099 | | |
2096 | | - | |
2097 | | - | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
2098 | 2110 | | |
2099 | 2111 | | |
2100 | 2112 | | |
| |||
0 commit comments