Package Details: mongodb 4.2.2-1

Git Clone URL: https://aur.archlinux.org/mongodb.git (read-only, click to copy)
Package Base: mongodb
Description: A high-performance, open source, schema-free document-oriented database
Upstream URL: https://www.mongodb.com/
Keywords: database document-oriented
Licenses: custom:SSPL
Submitter: felixonmars
Maintainer: jamespharvey20 (chrbayer)
Last Packager: jamespharvey20
Votes: 21
Popularity: 1.31
First Submitted: 2019-01-18 22:08
Last Updated: 2019-12-28 13:37

Pinned Comments

jamespharvey20 commented on 2019-08-21 22:40

READ ME - 4.2.0 is here - The good, the bad, and the ugly

Good! 4.2.0 finally supports python3. The dependency on aur/python2-scons is no longer needed.

Bad! 4.2.0 breaks having aur/wiredtiger as a separate package, so it is no longer needed. Upstream may fix this some day, but advised for now they can't be separate. When mongodb is being built, it recognizes it's not using a separate wiredtiger package and compiles wiredtiger's source into part of mongodb, so it's still there, just not separate. This increases the space required to about 260GB. The combined amount of time it takes to build shouldn't change.

Mixed! 4.2.0 breaks most of the tests performed in check() under devtools. Previously, only 8 tests couldn't run within devtools due to systemd-nspawn banning mlock(). Now, it appears hundreds of them require mlock(). It's no longer feasible to discover and disable all of them, and maintain this list between versions, so if devtools is detected, check() does nothing. In my opinion, that's bad news, because I'd like to run the tests. Many users will probably greatly welcome this change, because most of the space and time required to build mongodb is in check().

So, users of devtools will only need 20GB available to build this, and it will complete in about 30% of the time it used to, due to check() not doing anything.

But, direct users of makepkg (including probably most AUR helpers) will now need about 260GB available just to build this.

jamespharvey20 commented on 2019-02-22 03:50

READ ME - Manual intervention potentially required upgrading to or past 4.0.6-2

If you never modified /etc/mongodb.conf, there is nothing you need to do, as pacman will install the new configuration file for you.

If pacman alerts you that a new configuration file is saved at /etc/mongodb.conf.pacnew, you must switch to it, or at least modify your existing one to enable forking.

Among other cleanups, 4.0.6-2 switches to:

  1. Upstream's systemd service file, which uses a systemd service type of forking, versus the old Arch-specific type of simple.

  2. Upstream's configuration file, which uses the YAML format introduced back in 2.6, versus the old Arch-specific configuration file using the 2.4 format.

If you had modified /etc/mongodb.conf, pacman will install the new one to /etc/mongodb.conf.pacnew. So, you will either need to: switch to the new one, and duplicate changes you made to the old one that you still need, considering the new file is now in the YAML format; or modify your existing one to enable forking. (Using the old 2.4 file format, adding fork: true should be what is needed.)

jamespharvey20 commented on 2019-02-15 09:58

READ ME - This is quite the package to build

If you use makepkg or an AUR helper you should have 260GB available just to build this. If you use devtools, you will only need 20GB available, because check() is skipped.

It takes a lot of time to build this. Using makepkg, a user reported it took 6.5 hours on an Intel i7. 32 Xeon cores with a high-end NVMe takes an hour.

How much memory you need to build this is untested, but I'd guess having a low amount of memory could cause compilation errors.

If you have compilation problems, please use makepkg, or extra-x86_64-build from devtools, as AUR helpers are not officially supported.

Alternatively, there is the mongodb-bin package, which converts the pre-compiled Ubuntu package into one for Arch. Note Ubuntu's package may use different compilation options.

Latest Comments

1 2 3 4 5 6 Next › Last »

Hi-Angel commented on 2020-01-09 08:43

@Hi-Angel - sorry for not having responded earlier. I can't reproduce your problem. mongodb.tmpfiles is used to create the /var/{lib,log}/mognodb directories, and appears to be working fine for me. I even tried removing the package, removing the directories, and installing the package without non-existent directory errors

Thank you very much! I didn't know it should be created by systemd-tmpfiles. After you mentioned it, I did some digging, and it turned out that systemd-tmpfiles was broken for me. For some reason my / was not owned by root, no idea why, and systemd-tmpfiles was refusing to coop with that. So after I fixed permissions, the directories were correctly created.

Sorry for causing troubles!

jamespharvey20 commented on 2019-12-30 09:07

@azcn2503, what version of the dependency python-cheetah3 do you have installed? Likely, you need to upgrade that AUR package to 3.2.4-2. Please let me know either way. If this doesn't work, are you using makepkg, devtools, or an AUR helper?

EDIT: If you already have python-cheetah3 3.2.4-2 installed, try rebuilding it and reinstalling it. Possibly its dependencies changed and require a rebuild.

azcn2503 commented on 2019-12-30 07:31

Attempting to upgrade from 4.2.1-1 to 4.2.2-1 and receiving the following error:

Creating 'build/opt/mongo/config.h'
/usr/bin/python src/mongo/base/generate_error_codes.py src/mongo/base/error_codes.err src/mongo/base/error_codes.tpl.h=build/opt/mongo/base/error_codes.h src/mongo/base/error_codes.tpl.cpp=build/opt/mongo/base/error_codes.cpp
Traceback (most recent call last):
  File "src/mongo/base/generate_error_codes.py", line 45, in <module>
    from Cheetah.Template import Template
ModuleNotFoundError: No module named 'Cheetah'

jamespharvey20 commented on 2019-12-23 08:18

@Hi-Angel - sorry for not having responded earlier. I can't reproduce your problem. mongodb.tmpfiles is used to create the /var/{lib,log}/mognodb directories, and appears to be working fine for me. I even tried removing the package, removing the directories, and installing the package without non-existent directory errors.

@jiri.one - mongodb used to be in the official repos, but was dropped because upstream made a license change that was unclear (at best) whether it could be redistributed prepackaged, so it was dropped to the AUR. So, sorry, but it doesn't look like it's a candidate for going back to an official package.

jiri.one commented on 2019-12-07 18:09

Hi,have someone repo for mongodb? I know mongodb-bin, but better will be real Arch build.

Hi-Angel commented on 2019-11-28 10:10

Please, add the following directories to the PKGBUILD:

/var/lib/mongodb
/var/log/mongodb

These two are written in the default mongodb.conf that is shipped, and without them mongod fails to start with "non-existent directory" errors.

jamespharvey20 commented on 2019-11-19 02:45

archer666 - It just compiled fine for me, so I do think this was probably an out of memory issue. You could try the following things: * Decreasing the number of cores you're allowing it to use while building which will decrease the amount of memory usage. * Create additional swap space, even if you remove it after building. (If you can use a swap file, that will let you avoid partitioning.) * Remove check() from the PKGBUILD. I generally think it's a very good idea to run this, but on current packages, it just passed tests for me, and I see that's the phase you ran out of memory in.

archer666 commented on 2019-11-18 19:19

4.2.1 - no good

scons: building terminated because of errors. build/opt/mongo/db/s/collection_range_deleter_test.o failed: Error 1 ==> ERROR: A failure occurred in check(). Aborting... ==> ERROR: Makepkg was unable to build mongodb.

g++: fatal error: Killed signal terminated program cc1plus

Looks like out of memory - 16GB machine, I terminated almost everything, 10GB RAM free at least.

jamespharvey20 commented on 2019-10-16 01:53

lsr, I opened a bugreport upstream at https://jira.mongodb.org/browse/SERVER-44038

I'm baffled at what I found. Removing the line that forces ggdb that you brought up reduces my makepkg (so, tests are still ran) build size from 259GB to 2.3GB, and reduces the build from 70 minutes to 44 minutes. For users with platter drives, I think it will have an even more dramatic reduction in build times.

I tried several ways to get -O2 optimization, with no success.

I'm wondering if there's an intentional reason why they're doing this on posix, so am being cautious and waiting to hear back from upstream before I release a new version. I mean, I'd have to assume they would have noticed at some point in the past performance significantly dropped and have found they were forcing debug builds and no optimization, right?..... The stripped binary size doesn't change, but maybe there's some quirk here we're not aware of.

jamespharvey20 commented on 2019-10-14 10:40

lsr, awesome catch. I'm baffled by this, and can't wait to see how much faster mongodb performs. I know version 4.0.6 (when mongodb was dropped from community) had a similar build time and size requirement. It will be interesting to know how/when/why this came about. I'll admit I never looked through the SConstruct file other than having to do with system library options, and just went off upstream's compilation instructions which of course don't mention this. I'll be running compilation size and time benchmarks as is, without the forcing of -ggdb you pointed out, and also without -ggdb and the release option for optimization. I'll be posting back here, and likely be filing a bugreport upstream. I'm hoping fixing this and using optimizations won't drastically increase compilation times, but my guess is it will, we'll see...