fix writing to cache when fallback server should be used immediately #23282

Merged
merged 1 commit into from Mar 17, 2016

Projects

None yet

4 participants

@blizzz
Contributor
blizzz commented Mar 15, 2016

To reproduce:

  1. Have a memory cache enabled
  2. Have an LDAP server configured including a backup server
  3. Turn off main LDAP server
  4. Attempt login twice

First attempted may take a while (depending on the network e.g.), but the second attempt should be done normally. If you monitor your network, the main ldap server should be contacted only once (!), and the fallback twice.

Comes with unit test.

Fixes https://github.com/owncloud/enterprise/issues/988

Please test and review @owncloud/ldap @owncloud/qa @MorrisJobke

@karlitschek request to backport down to 8.1

@blizzz blizzz added this to the 9.1-current milestone Mar 15, 2016
@blizzz
Contributor
blizzz commented Mar 15, 2016

Tests:

19:46:11 PHP Fatal error: Uncaught exception 'Exception' with message 'Not installed' in /ssd/jenkins/workspace/server-master-linux-externals-ci/database/sqlite/external/smb-silvershell/label/SLAVE/lib/base.php:290

19:46:16 PHP Fatal error: Uncaught exception 'Exception' with message 'Not installed' in /ssd/jenkins/workspace/server-master-linux-externals-ci/database/sqlite/external/webdav-ownCloud/label/SLAVE/lib/base.php:290

and so on

โ“ @DeepDiver1975

@karlitschek
Member

wow. nice debugging. ๐Ÿ‘ please backport

@blizzz blizzz fix writing to cache when fallback server should be used immediately
8e0bd56
@blizzz
Contributor
blizzz commented Mar 16, 2016

rebased

@MorrisJobke
Member

Tested and works ๐Ÿ‘

@DeepDiver1975 DeepDiver1975 merged commit 31ee463 into master Mar 17, 2016

22 of 23 checks passed

server-master-linux-externals-ci/database=sqlite,external=swift-ceph,label=SLAVE Build #8306 found unstable in 12 min
Details
Scrutinizer 2 new issues, 1 updated code elements
Details
cla-bot-core Build #2330 succeeded in 10 sec
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
core-ci-linux-jsunit/database=sqlite,label=SLAVE Build #59493 succeeded in 8 min 10 sec
Details
core-ci-linux-swift-primary-storage/database=mysql,label=SLAVE Build #53449 succeeded in 52 min
Details
core-ci-linux/database=mysql,label=SLAVE Build #28100 succeeded in 27 min
Details
core-ci-linux/database=oci,label=SLAVE Build #28100 succeeded in 54 min
Details
core-ci-linux/database=pgsql,label=SLAVE Build #28100 succeeded in 23 min
Details
core-ci-linux/database=sqlite,label=SLAVE Build #28100 succeeded in 12 min
Details
ocs-api-integration-tests-ci Build #8485 succeeded in 14 min
Details
server-master-linux-externals-ci/database=sqlite,external=smb-silvershell,label=SLAVE Build #8306 succeeded in 9 min 29 sec
Details
server-master-linux-externals-ci/database=sqlite,external=webdav-ownCloud,label=SLAVE Build #8306 succeeded in 12 min
Details
server-master-linux-externals-smb-windows-ext-ci/database=sqlite,external=smb-windows,label=master Build #8725 succeeded in 3 min 2 sec
Details
server-master-linux-php5.4-ci/database=sqlite,label=SLAVE Build #835 succeeded in 15 min
Details
server-master-linux-php7-ci/database=sqlite,label=SLAVE Build #36289 succeeded in 12 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=litmus,mirallBranch=v2.0.2,slave=SMASH Build #12699 succeeded in 6 min 26 sec
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_basicSync@0,mirallBranch=v2.0.2,slave=SMASH Build #12699 succeeded in 40 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_basicSync@1,mirallBranch=v2.0.2,slave=SMASH Build #12699 succeeded in 37 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_shareLink,mirallBranch=v2.0.2,slave=SMASH Build #12699 succeeded in 20 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePermissions,mirallBranch=v2.0.2,slave=SMASH Build #12699 succeeded in 35 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePropagationGroups,mirallBranch=v2.0.2,slave=SMASH Build #12699 succeeded in 12 min
Details
smashbox-on-docker-ci/DOCKER_IMAGE=ubuntu_oc_lamp-git,TEST_NAME=test_sharePropagationInsideGroups,mirallBranch=v2.0.2,slave=SMASH Build #12699 succeeded in 9 min 35 sec
Details
@DeepDiver1975 DeepDiver1975 deleted the fix-caching-unavailable-ldap branch Mar 17, 2016
@blizzz
Contributor
blizzz commented Mar 18, 2016

Backports ๐Ÿ“ข

stable9: #23401
stable8.2: #23402
stable8.1: #23403

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment