Skip to content

Commit

Permalink
Merge branch '3.8' of https://github.com/JumpMind/symmetric-ds.git in…
Browse files Browse the repository at this point in the history
…to 3.8
  • Loading branch information
chenson42 committed Mar 24, 2017
2 parents e5902b5 + 2b1f7d0 commit cf8bac7
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 72 deletions.
Expand Up @@ -377,6 +377,8 @@ private ParameterConstants() {

public final static String OUTGOING_BATCH_UPDATE_STATUS_MILLIS = "outgoing.batches.update.status.millis";

public final static String OUTGOING_BATCH_UPDATE_STATUS_DATA_COUNT = "outgoing.batches.update.status.data.count";

public final static String FIREBIRD_EXTRACT_VARCHAR_ROW_OLD_PK_DATA = "firebird.extract.varchar.row.old.pk.data";

public static Map<String, ParameterMetaData> getParameterMetaData() {
Expand Down
Expand Up @@ -769,9 +769,15 @@ final protected boolean changeBatchStatus(Status status, OutgoingBatch currentBa
}
if (mode != ExtractMode.EXTRACT_ONLY) {
long batchStatusUpdateMillis = parameterService.getLong(ParameterConstants.OUTGOING_BATCH_UPDATE_STATUS_MILLIS);
if (currentBatch.getStatus() == Status.RQ || currentBatch.getStatus() == Status.LD ||
int batchStatusUpdateDataCount = parameterService.getInt(ParameterConstants.OUTGOING_BATCH_UPDATE_STATUS_DATA_COUNT);
Channel channel = configurationService.getChannel(currentBatch.getChannelId());

if (currentBatch.getStatus() == Status.RQ ||
currentBatch.getStatus() == Status.LD ||
currentBatch.getLastUpdatedTime() == null ||
System.currentTimeMillis() - batchStatusUpdateMillis >= currentBatch.getLastUpdatedTime().getTime()) {
System.currentTimeMillis() - batchStatusUpdateMillis >= currentBatch.getLastUpdatedTime().getTime() ||
channel.isReloadFlag() ||
currentBatch.getDataEventCount() > batchStatusUpdateDataCount) {
outgoingBatchService.updateOutgoingBatch(currentBatch);
return true;
}
Expand Down
Expand Up @@ -1063,6 +1063,15 @@ outgoing.batches.copy.to.incoming.staging=true
# Tags: extract
outgoing.batches.update.status.millis=10000


# Update the outgoing batch status to QY (querying) and SE (sending) when
# the data event count is larger than this threshold.
# This can improve performance overhead on small batches by avoiding status updates.
#
# DatabaseOverridable: true
# Tags: extract
outgoing.batches.update.status.data.count=1000

# Disable the extraction of all channels with the exception of the config channel
#
# DatabaseOverridable: true
Expand Down
141 changes: 71 additions & 70 deletions symmetric-core/src/test/resources/symmetric-test.properties
@@ -1,71 +1,72 @@
#
# Licensed to JumpMind Inc under one or more contributor
# license agreements. See the NOTICE file distributed
# with this work for additional information regarding
# copyright ownership. JumpMind Inc licenses this file
# to you under the GNU General Public License, version 3.0 (GPLv3)
# (the "License"); you may not use this file except in compliance
# with the License.
#
# You should have received a copy of the GNU General Public License,
# version 3.0 (GPLv3) along with this library; if not, see
# <http://www.gnu.org/licenses/>.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

client.group.id=test-node-group
client.external.id=00001
client.sync.url=
client.registration.url=http://localhost:$(portNumber)/sync
client.engine.name=client

root.group.id=test-root-group
root.external.id=00000
root.sync.url=http://localhost:$(portNumber)/sync
root.registration.url=
root.engine.name=root

# enable to test locking
cluster.lock.enabled=true

db.pool.initial.size=1
db.pool.max.active=5

dataextractor.keepalive.period.ms=500
auto.refresh.after.config.changes.detected=false

http.concurrent.workers.max=2
start.pull.job=false
start.push.job=false
start.route.job=false
start.purge.job=false
start.synctriggers.job=false
start.heartbeat.job=false
start.stat.flush.job=false
start.watchdog.job=false
start.stage.management.job=false
file.sync.enable=true
start.file.sync.tracker.job=false
start.file.sync.push.job=false
start.file.sync.pull.job=false
start.initial.load.extract.job=false
start.monitor.job=false
purge.retention.minutes=0
stream.to.file.threshold.bytes=0
compression.level=1
compression.strategy=1
#trigger.update.capture.changed.data.only.enabled=true
offline.node.detection.period.minutes=120
jobs.synchronized.enable=true
initial.load.use.extract.job.enabled=false
sync.triggers.thread.count.per.server=1

#ip.filters=10.5-1.254-1.*,11.100.200-100.*, 100.50.*.*, 50.25.2.0/24

#
# Licensed to JumpMind Inc under one or more contributor
# license agreements. See the NOTICE file distributed
# with this work for additional information regarding
# copyright ownership. JumpMind Inc licenses this file
# to you under the GNU General Public License, version 3.0 (GPLv3)
# (the "License"); you may not use this file except in compliance
# with the License.
#
# You should have received a copy of the GNU General Public License,
# version 3.0 (GPLv3) along with this library; if not, see
# <http://www.gnu.org/licenses/>.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

client.group.id=test-node-group
client.external.id=00001
client.sync.url=
client.registration.url=http://localhost:$(portNumber)/sync
client.engine.name=client

root.group.id=test-root-group
root.external.id=00000
root.sync.url=http://localhost:$(portNumber)/sync
root.registration.url=
root.engine.name=root

# enable to test locking
cluster.lock.enabled=true

db.pool.initial.size=1
db.pool.max.active=5

dataextractor.keepalive.period.ms=500
auto.refresh.after.config.changes.detected=false

http.concurrent.workers.max=2
start.pull.job=false
start.push.job=false
start.route.job=false
route.on.extract=true
start.purge.job=false
start.synctriggers.job=false
start.heartbeat.job=false
start.stat.flush.job=false
start.watchdog.job=false
start.stage.management.job=false
file.sync.enable=true
start.file.sync.tracker.job=false
start.file.sync.push.job=false
start.file.sync.pull.job=false
start.initial.load.extract.job=false
start.monitor.job=false
purge.retention.minutes=0
stream.to.file.threshold.bytes=0
compression.level=1
compression.strategy=1
#trigger.update.capture.changed.data.only.enabled=true
offline.node.detection.period.minutes=120
jobs.synchronized.enable=true
initial.load.use.extract.job.enabled=false
sync.triggers.thread.count.per.server=1

#ip.filters=10.5-1.254-1.*,11.100.200-100.*, 100.50.*.*, 50.25.2.0/24

#auto.sync.configuration=false

0 comments on commit cf8bac7

Please sign in to comment.