[
https://issues.apache.org/jira/browse/TEPHRA-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16164992#comment-16164992
]
ASF GitHub Bot commented on TEPHRA-243:
---------------------------------------
Github user anew commented on a diff in the pull request:
https://github.com/apache/incubator-tephra/pull/53#discussion_r138684944
--- Diff:
tephra-core/src/main/java/org/apache/tephra/persist/AbstractTransactionLog.java
---
@@ -165,26 +203,36 @@ private void sync() throws IOException {
// prevent writer being dereferenced
tmpWriter = writer;
- List<Entry> currentPending = getPendingWrites();
- if (!currentPending.isEmpty()) {
- tmpWriter.commitMarker(currentPending.size());
- }
-
- // write out all accumulated entries to log.
- for (Entry e : currentPending) {
- tmpWriter.append(e);
- entryCount++;
- latestSeq = Math.max(latestSeq, e.getKey().get());
+ Entry[] currentPending = getPendingWrites();
+ if (currentPending != null) {
+ entryCount = currentPending.length;
+ startTimerIfNeeded(tmpWriter, entryCount);
+ tmpWriter.commitMarker(entryCount);
+ for (Entry e : currentPending) {
+ tmpWriter.append(e);
+ latestSeq = Math.max(latestSeq, e.getKey().get());
--- End diff --
yes, actually that has always been the case, even before these changes...
> When transaction log sync is slow, the warning message should contain more
> information
> --------------------------------------------------------------------------------------
>
> Key: TEPHRA-243
> URL: https://issues.apache.org/jira/browse/TEPHRA-243
> Project: Tephra
> Issue Type: Improvement
> Affects Versions: 0.12.0-incubating
> Reporter: Andreas Neumann
> Assignee: Andreas Neumann
> Fix For: 0.13.0-incubating
>
>
> Currently we get this message:
> {noformat}
> 2017-08-12 00:59:46,938 - INFO
> [TTransactionServer-rpc-857:o.a.t.p.AbstractTransactionLog@102] - Slow append
> to log txlog.1502517541689, took 1431 msec.
> {noformat}
> It would be more useful to know how many bytes were written, how many edits
> were in this sync.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)