[OP-177] Ability to reduce the max WindowSize from server side Created: 02/Mar/15  Updated: 07/Apr/15  Resolved: 09/Mar/15

Status: Closed
Project: Opush
Component/s: None
Affects Version/s: None
Fix Version/s: 3.1.0

Type: Bug Priority: Normal
Reporter: Thomas HILAIRE Assignee: Antoine DUPRAT
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Rank: 6783

 Description   

Pre-conditions

usera has a device which don't provide a WindowSize attribute in its Sync requests

Reproduction steps

  1. As admin with an opush server, I set the "default-window-size" variable at 10.
  2. Send 100 emails to usera

Current behavior

  1. NOK As usera, I synchronize my inbox and I get my 100 emails at once

Expected behavior

  1. OK As usera, I synchronize my inbox and I get all my emails 10 by 10

Additional informations

The server can produce a log as CONFIGURATION to show the default-window-size value



 Comments   
Comment by Antoine DUPRAT [ 04/Mar/15 ]

We should also bring a max-window-size parameter to the configuration in order to override the value send by the device.
By this way, we may tune Opush to resolve out of memory and long time requests.

Comment by Antoine DUPRAT [ 09/Mar/15 ]

QA:
Two entries are added in /etc/opush/opush.ini configuration file.

# Default window size
window-size=50

# Max window size, no value by default 
#window-size.max=100
  • window-size: should be used when no window size is given by the phone
  • winwod-size.max: should limit the amount of items to be synchronized at once
Comment by Jenkins Continuous Integration Server [ 09/Mar/15 ]

SUCCESS: Integrated in opush-master #198
OP-177 Add default window size parameter in configuration (thilaire: 302f9c75b43ef06dbd9c08870ee4ab60c2d0ed27)

  • push-server/src/main/asciidoc/rhel-configuration.adoc
  • opush-conf/src/deb/resources/etc/opush.ini
  • push-configuration/src/test/java/org/obm/push/configuration/OpushConfigurationImplTest.java
  • integration-testing/opush/src/main/java/org/obm/opush/env/OpushStaticConfiguration.java
  • push-server/src/main/asciidoc/debian-installation.adoc
  • push-configuration/src/main/java/org/obm/push/configuration/OpushConfigurationImpl.java
  • push-configuration/src/main/java/org/obm/push/configuration/OpushConfiguration.java
    OP-177 Take window size from configuration when none (thilaire: e2b62682aa7cad42710b08e3aa13811b9b4d5d95)
  • protocol/src/test/java/org/obm/push/protocol/bean/SyncCollectionTest.java
  • protocol/src/main/java/org/obm/push/protocol/bean/SyncRequest.java
  • push-core/src/main/java/org/obm/push/protocol/data/SyncAnalyser.java
  • push-core/src/main/java/org/obm/push/protocol/data/PingAnalyser.java
  • integration-testing/opush/src/test/java/org/obm/opush/command/sync/SyncHandlerWithBackendTest.java
  • push-core/src/test/java/org/obm/push/protocol/data/PingAnalyserTest.java
  • client/src/main/java/org/obm/sync/push/client/commands/EmailSyncNoOptionsCommand.java
  • client/src/main/resources/data/EmailSyncRequestNoOptions.xml
  • protocol/src/test/java/org/obm/push/protocol/SyncProtocolTest.java
  • integration-testing/opush/src/test/java/org/obm/opush/MailBackendGetChangedTest.java
  • obm-backend/src/main/java/org/obm/push/impl/ObmSyncBackend.java
  • push-bean/src/main/java/org/obm/push/bean/AnalysedSyncCollection.java
  • protocol/src/test/java/org/obm/push/BeansTest.java
  • push-bean/src/test/java/org/obm/push/bean/AnalysedSyncCollectionTest.java
  • protocol/src/test/java/org/obm/push/protocol/data/SyncDecoderTest.java
  • protocol/src/main/java/org/obm/push/protocol/data/SyncEncoder.java
  • push-mail/src/main/java/org/obm/push/mail/MailBackendImpl.java
  • push-bean/src/main/java/org/obm/push/bean/SyncDefaultValues.java
  • push-core/src/test/java/org/obm/push/protocol/data/SyncAnalyserTest.java
  • protocol/src/test/java/org/obm/push/protocol/bean/SyncRequestTest.java
  • integration-testing/opush/src/main/java/org/obm/opush/IntegrationTestUtils.java
  • client/src/main/java/org/obm/sync/push/client/commands/Sync.java
  • protocol/src/main/java/org/obm/push/protocol/bean/SyncCollection.java
    OP-177 Add max window size parameter in configuration (thilaire: 247e40b8e2c7f0fb9480f88335846854833c7125)
  • integration-testing/opush/src/main/java/org/obm/opush/env/OpushStaticConfiguration.java
  • push-configuration/src/main/java/org/obm/push/configuration/OpushConfigurationImpl.java
  • push-configuration/src/main/java/org/obm/push/configuration/OpushConfiguration.java
  • push-configuration/pom.xml
  • push-server/src/main/asciidoc/debian-installation.adoc
  • opush-conf/src/deb/resources/etc/opush.ini
  • push-server/src/main/asciidoc/rhel-configuration.adoc
  • push-configuration/src/test/java/org/obm/push/configuration/OpushConfigurationImplTest.java
    OP-177 Use max window size when analysing sync request (thilaire: 1dc7e9bc9da1f5a9753325fec6a7002d966062ec)
  • push-core/src/main/java/org/obm/push/protocol/data/SyncAnalyser.java
  • push-core/src/test/java/org/obm/push/protocol/data/SyncAnalyserTest.java
    OP-177 Remove unused parameter (thilaire: 2590309461b203b5df1047d7d591a136790a8bb7)
  • obm-backend/src/main/java/org/obm/push/impl/ObmSyncBackend.java
  • push-mail/src/main/java/org/obm/push/mail/MailBackendImpl.java
  • push-mail/src/test/java/org/obm/push/mail/MailBackendImplTest.java
  • push-dao-cassandra/src/main/java/org/obm/push/cassandra/dao/WindowingDaoCassandraImpl.java
  • push-dao/src/main/java/org/obm/push/store/WindowingDao.java
  • integration-testing/opush/src/test/java/org/obm/opush/windowing/WindowingStepdefs.java
  • push-dao-testsuite/src/main/java/org/obm/push/dao/testsuite/WindowingDaoTest.java
Comment by Antoine DUPRAT [ 07/Apr/15 ]

OK
Tested on CentOS 6.5 with Opush 3.1.0~alpha0~git20150327.162644.3b1273a-1

Device WindowSize Default WindowSize Max WindowSize
Nexus 4 5.0.1 10 / /
    5 /
    5 5
    5 1
iPad 8.2 25 / /
    5 /
    5 5
    5 1
Windows Phone 8 25 / /
    5 /
    5 5
    5 1
Galaxy SII 4.1.2 50 / /
    5 /
    5 5
    5 1
Generated at Tue Aug 20 05:00:33 CEST 2019 using JIRA 6.1.1#6155-sha1:7188aeec9a6b57d61ea04c52f235f15f55c105e2.