CouchDB
  1. CouchDB
  2. COUCHDB-505

Erlang code path prefers older versions of CouchDB

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.11
    • Fix Version/s: 1.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      any system where different minor versions of CouchDB have been installed to the same --prefix

    • Skill Level:
      Regular Contributors Level (Easy to Medium)

      Description

      We're using ERL_LIBS to add PREFIX/lib/couchdb/erlang/lib to the code path on CouchDB startup. If multiple versions of CouchDB have been installed, that directory might look something like

      mochiweb-r97
      ibrowse-1.5.2
      couch-0.9.0
      couch-0.10.0a
      ...

      In this case, we want the system to use beams from couch-0.10.0a, but apparently Erlang's code loader sorts couch-0.9.0 higher.

      One solution would be to fall back to explicitly adding specific app directories to the code path using -pa.

      An elegant solution would be to make sure that our app directories are named in such a way that they automatically sort correctly in the code loader. I'm not sure this is really possible, though, particularly when a user is installing development versions built from source next to released versions.

        Activity

        Adam Kocoloski created issue -
        Hide
        Jan Lehnardt added a comment -

        unblock

        Show
        Jan Lehnardt added a comment - unblock
        Jan Lehnardt made changes -
        Field Original Value New Value
        Assignee Adam Kocoloski [ kocolosk ]
        Priority Blocker [ 1 ] Major [ 3 ]
        Noah Slater made changes -
        Fix Version/s 0.12 [ 12314314 ]
        Fix Version/s 0.11 [ 12313841 ]
        Paul Joseph Davis made changes -
        Skill Level Regular Contributors Level (Easy to Medium)
        Jan Lehnardt made changes -
        Fix Version/s 1.2 [ 12315198 ]
        Fix Version/s 0.12 [ 12314314 ]
        Hide
        Jan Lehnardt added a comment -

        Declaring this won't fix now that we are >1.0

        Show
        Jan Lehnardt added a comment - Declaring this won't fix now that we are >1.0
        Jan Lehnardt made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Won't Fix [ 2 ]
        Hide
        Noah Slater added a comment -

        Also, this is really a bug with Erlang, and should be taken upstream.

        Show
        Noah Slater added a comment - Also, this is really a bug with Erlang, and should be taken upstream.
        Hide
        Adam Kocoloski added a comment -

        Enh, doubt that would go anywhere. Best practices for deploying Erlang/OTP systems these days explicitly specify the versions of applications to be loaded.

        Show
        Adam Kocoloski added a comment - Enh, doubt that would go anywhere. Best practices for deploying Erlang/OTP systems these days explicitly specify the versions of applications to be loaded.

          People

          • Assignee:
            Adam Kocoloski
            Reporter:
            Adam Kocoloski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development