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

[improve] Shutdown log when shutdown process #2028

Merged
merged 1 commit into from
Nov 22, 2022
Merged

Conversation

coderzc
Copy link
Member

@coderzc coderzc commented Nov 22, 2022

Motivation

If set immediateFlush="false" and log size < bufferSize log can't flush to file, we should call LogManager.shutdown() when shutdown process ensures log flush to file.

<RollingRandomAccessFile name="audit" fileName="${LOG_PATH}/audit-${FILE_NAME}.log"
filePattern="${LOG_PATH}/$${date:yyyy-MM}/audit-${FILE_NAME}-%d{yyyy-MM-dd-HH}-%i.gz"
bufferSize="524288" immediateFlush="false">

Modifications

  • Shutdown log when shutdown process
  • Improve RIGHT_MARGIN and SOFT_MARGINS

@coderzc coderzc added the improvement General improvement label Nov 22, 2022
@coderzc coderzc added this to the 1.0.0 milestone Nov 22, 2022
@codecov
Copy link

codecov bot commented Nov 22, 2022

Codecov Report

Merging #2028 (cc00726) into master (aa0d8da) will increase coverage by 3.99%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master    #2028      +/-   ##
============================================
+ Coverage     62.39%   66.38%   +3.99%     
- Complexity      976      978       +2     
============================================
  Files           482      482              
  Lines         41462    41463       +1     
  Branches       5890     5890              
============================================
+ Hits          25869    27524    +1655     
+ Misses        13046    11243    -1803     
- Partials       2547     2696     +149     
Impacted Files Coverage Δ
...java/com/baidu/hugegraph/dist/HugeGraphServer.java 35.93% <0.00%> (-0.58%) ⬇️
...va/com/baidu/hugegraph/util/collection/IntSet.java 73.72% <0.00%> (-1.28%) ⬇️
...m/baidu/hugegraph/backend/tx/GraphTransaction.java 79.93% <0.00%> (ø)
...c/main/java/com/baidu/hugegraph/task/HugeTask.java 72.22% <0.00%> (+0.30%) ⬆️
...va/com/baidu/hugegraph/util/collection/IntMap.java 72.80% <0.00%> (+0.39%) ⬆️
...gegraph/backend/cache/CachedSchemaTransaction.java 90.82% <0.00%> (+0.48%) ⬆️
...om/baidu/hugegraph/task/StandardTaskScheduler.java 75.56% <0.00%> (+0.49%) ⬆️
.../main/java/com/baidu/hugegraph/util/Consumers.java 56.84% <0.00%> (+0.68%) ⬆️
.../baidu/hugegraph/backend/tx/SchemaTransaction.java 89.61% <0.00%> (+0.69%) ⬆️
...a/com/baidu/hugegraph/backend/query/Condition.java 79.09% <0.00%> (+0.69%) ⬆️
... and 51 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@coderzc coderzc requested review from javeme, Linary and imbajin and removed request for javeme and Linary November 22, 2022 05:47
Copy link
Member

@imbajin imbajin left a comment

Choose a reason for hiding this comment

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

lgtm

@javeme javeme merged commit 4c232a6 into master Nov 22, 2022
@javeme javeme deleted the improve_log_shutdown branch November 22, 2022 12:35
imbajin pushed a commit to z7658329/hugegraph that referenced this pull request Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement General improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants