[ckan-changes] [okfn/ckan] c81ce4: Avoid unnecessary commit request

GitHub noreply at github.com
Wed Aug 15 10:02:44 UTC 2012


  Branch: refs/heads/release-v1.8
  Home:   https://github.com/okfn/ckan
  Commit: c81ce4b6816e0669cf878603b1046558644b258f
      https://github.com/okfn/ckan/commit/c81ce4b6816e0669cf878603b1046558644b258f
  Author: amercader <amercadero at gmail.com>
  Date:   2012-08-15 (Wed, 15 Aug 2012)

  Changed paths:
    M ckan/lib/search/index.py

  Log Message:
  -----------
  Avoid unnecessary commit request

The commit can be sent on the same request with the dict to index


  Commit: 7b65a54088db9f8ed0511aa200a6409ebe223392
      https://github.com/okfn/ckan/commit/7b65a54088db9f8ed0511aa200a6409ebe223392
  Author: amercader <amercadero at gmail.com>
  Date:   2012-08-15 (Wed, 15 Aug 2012)

  Changed paths:
    M ckan/lib/cli.py
    M ckan/lib/search/__init__.py
    M ckan/lib/search/index.py
    M ckan/tests/lib/test_cli.py

  Log Message:
  -----------
  Commit only once at the end of a search index rebuild

Commiting changes in the Solr search index is a heavy task that takes
significant time. We are currently commiting changes after each update,
which is probably fine for individual updated (ie users editing or
creating a dataset), but when rebuilding the whole index it is
unnecessary. A single commit at the end of the process is needed, and
that speeds the reindexing about a 85%.

A flag has been added (`-e` or `--commit-each`) to allow the old
behaviour (commiting after each edit).


  Commit: 8473cd8bcb15d88805a309470129ed10fe8ba522
      https://github.com/okfn/ckan/commit/8473cd8bcb15d88805a309470129ed10fe8ba522
  Author: amercader <amercadero at gmail.com>
  Date:   2012-08-15 (Wed, 15 Aug 2012)

  Changed paths:
    M ckan/logic/action/create.py
    M ckan/logic/action/update.py

  Log Message:
  -----------
  Allow not returning the package dict when creating or updating

This avoids calling package_show


  Commit: 74f12575b32922c92b0f607c809692911ef641e1
      https://github.com/okfn/ckan/commit/74f12575b32922c92b0f607c809692911ef641e1
  Author: amercader <amercadero at gmail.com>
  Date:   2012-08-15 (Wed, 15 Aug 2012)

  Changed paths:
    M ckan/logic/action/create.py
    M ckan/logic/action/update.py

  Log Message:
  -----------
  Return dataset id if 'return_pacakge_dict' is False


  Commit: 4006757ba6a6ead21c3deb17427fd6176b481ec2
      https://github.com/okfn/ckan/commit/4006757ba6a6ead21c3deb17427fd6176b481ec2
  Author: amercader <amercadero at gmail.com>
  Date:   2012-08-15 (Wed, 15 Aug 2012)

  Changed paths:
    M ckan/logic/action/create.py
    M ckan/logic/action/update.py

  Log Message:
  -----------
  Use return_id_only instead of return_package_dict

Suggested by @tobes, as it is more backwards compatible


Compare: https://github.com/okfn/ckan/compare/72b0e9fcab4f...4006757ba6a6


More information about the ckan-changes mailing list