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

Implement Blocking Logger Mechanism #2627

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

JC-comp
Copy link

@JC-comp JC-comp commented Feb 6, 2024

This PR introduces a blocking logger mechanism to replace the existing polling mechanism for enhanced efficiency and resource utilization. The new blocking logger ensures that log messages are processed synchronously, eliminating the need for continuous polling.

Changes

  • Implementation of a blocking logger mechanism
  • Remove redundent sleep for final ouput
  • Adjust cleanup process

@abraunegg
Copy link
Owner

@JC-comp
Unable to compile this PR:

clientSideFiltering.d src/monitor.d src/arsd/cgi.d -ofonedrive
src/log.d(95): Error: non-shared method core.sync.condition.Condition.notify is not callable using a shared object
src/log.d(95):        Consider adding shared to core.sync.condition.Condition.notify

Is there some sort of 'ordering' to your PR for sequencing .. as there is some 'shared' change in #2608

Please fix, so that this PR (and all your others) self compile correctly, so that when I am testing these PR's they can be tested before being implemented.

@JC-comp
Copy link
Author

JC-comp commented Feb 11, 2024

@abraunegg
Please update the ldc compiler to at least version 1.23.0 as the shared feature has been introduced in this release.
Thank you.

@abraunegg
Copy link
Owner

@JC-comp
Unfortunately using a more modern LDC compiler is not going to be possible ... why?

The issue stems from Debian and Ubuntu LTS versions - such as Ubuntu 20.04. It's ldc package is only v1.20.1 , thus, this is the minimum version that all compilation needs to be tested against. Why?

Because the distribution version of 'ldc' is used to compile the packages presented at the OpenSuSE Build Service

This means, the minimum version of LDC that can be tested against against all of these, which right now is Ubuntu 20.04 which is LDC v1.20.1.

Currently I test against an even lower version (v1.18.0) because of even older architectures for Raspberry Pi operating systems.

So in your testing and building, you must test each PR separately, by itself, compiling against the minimum LDC version, using a script similar to the following (assuming you already know how to install 'ldc' manually, and can install v1.20.1):

#!/bin/bash
  
PR=2627

rm -rf ./onedrive-pr${PR}
git clone https://github.com/abraunegg/onedrive.git onedrive-pr${PR}
cd onedrive-pr${PR}
git fetch origin pull/${PR}/head:pr${PR}
git checkout pr${PR}

# MIN LDC Version to compile
# MIN Version for ARM / Compiling with LDC
#source ~/dlang/ldc-1.18.0/activate
source ~/dlang/ldc-1.20.1/activate


./configure --enable-debug --enable-notifications; make clean; make;
deactivate
./onedrive --version

When using this script, against your PR, it generates the following error:

src/log.d(95): Error: non-shared method core.sync.condition.Condition.notify is not callable using a shared object
src/log.d(95):        Consider adding shared to core.sync.condition.Condition.notify

You must make your code compatible with LDC v1.20.1 at a minimum.

@JC-comp
Copy link
Author

JC-comp commented Feb 12, 2024

Update

  • Ensure backward compatibility with ldc v1.20.1 and test the compilation.

@abraunegg abraunegg merged commit c7bfd0d into abraunegg:onedrive-v2.5.0-alpha-5 Feb 12, 2024
@JC-comp JC-comp deleted the logging branch February 12, 2024 15:48
@abraunegg
Copy link
Owner

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Repository owner locked and limited conversation to collaborators Feb 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants