Граф коммитов

739 Коммитов

Автор SHA1 Сообщение Дата
Robert Raposa 1f26217d95 Remove sort order. 2016-09-12 14:30:50 -04:00
wajeeha-khalid bb116a1973 Merge pull request #186 from edx/jia/MA-2139
MA-2139: Mark thread as read for leaner on thread/comment creation
2016-09-09 18:34:04 +05:00
wajeeha-khalid 3d506614fe MA-2139: Mark thread as read on thread and comment creation/update/actions 2016-09-09 18:19:56 +05:00
Calen Pennington b832156039 Merge pull request #203 from edx/add-openedx-yaml
Add an OEP-2 compliant openedx.yaml file
2016-09-07 11:20:33 -04:00
Calen Pennington a52e7d5d8c Specify an owner 2016-09-07 11:06:51 -04:00
Calen Pennington c7af72a33c Add an OEP-2 compliant openedx.yaml file 2016-09-07 11:06:51 -04:00
Robert Raposa 2fd437a02a Merge pull request #205 from edx/perf/get-thread-without-responses
Add the ability to request a thread without its responses.
2016-09-07 09:39:21 -04:00
Toby Lawrence 965efede1a Add the ability to request a thread without its responses.
For cases where we don't need or want the responses on a thread at all,
like getting some metadata about a thread, we should be able to request
it without the responses.  This exists in the ThreadPresenter but didn't
exist as an option that could be passed in the API call itself.

We've added this as an option now -- with_responses -- that defaults to
true, which preserves the existing behavior but does in fact allow
toggling.

This gives us a backwards-compatible upgrade path to allow changes to be
made the LMS so that requests which don't need the responses, or do need
the responses, can be explicit about what they want.
2016-09-07 09:26:37 -04:00
wajeeha-khalid f051f49551 Merge pull request #192 from edx/jia/MA-2678
MA-2678: replace use of 'updated_at' for 'read' state
2016-09-07 12:02:37 +05:00
wajeeha-khalid e55d82348f MA-2678: replace use of 'updated_at' for 'read' state 2016-09-02 11:06:35 +05:00
Toby Lawrence 7cc9a131a2 Merge pull request #204 from edx/perf/pluck-not-map-voting-ids
Plucking instead of mapping.
2016-08-24 10:20:59 -04:00
Toby Lawrence e94358798d Try plucking instead of mapping.
Use pluck instead of map for upvoted/downvoted IDs.

Mapping involves doing the projection locally, whereas plucking will ask
MongoDB to do the projection for us.  This is the difference between
sending the whole document back and sending back the ObjectId itself.

Multipled against hundreds or thousands of documents, mapping can really
add up, so plucking should really help these 99%'ile cases.
2016-08-24 10:02:42 -04:00
Toby Lawrence 3d902ee8c4 Merge pull request #202 from edx/perf/tracing-and-consistency
Add more tracing + code cleanup.
2016-08-23 11:00:41 -04:00
Toby Lawrence 01bd17bcb2 Don't need to require NR method tracer; we're not tracing any methods. 2016-08-23 10:39:45 -04:00
Toby Lawrence 8d2caf6dca Back to what it was. Faster that way. -_- 2016-08-23 09:56:58 -04:00
Toby Lawrence db7235501f Clean up usages of Mongoid to generate cleaner code / queries. 2016-08-23 08:16:08 -04:00
Toby Lawrence 925dd72a9d Add tracing to #to_hash for Comment/CommentThread. 2016-08-23 08:16:03 -04:00
Toby Lawrence 1f4b77a9bd Merge pull request #201 from edx/revert/ruby-23-upgrade
Revert "Merge pull request #196 from edx/platform/upgrade-to-ruby23"
2016-08-22 15:36:08 -04:00
Toby Lawrence e9762d744b Revert "Merge pull request #196 from edx/platform/upgrade-to-ruby23"
This reverts commit 22178086b2, reversing
changes made to 14ed8a85c6.
2016-08-22 15:08:29 -04:00
Toby Lawrence 22178086b2 Merge pull request #196 from edx/platform/upgrade-to-ruby23
Upgrade to Ruby 2.3.0
2016-08-19 14:02:50 -04:00
Toby Lawrence 03af2e0f3a Merge branch 'master' into platform/upgrade-to-ruby23 2016-08-19 13:47:52 -04:00
Toby Lawrence 14ed8a85c6 Merge pull request #200 from edx/perf/n-plus-one-use-relations
Use proper relations instead of forcefully loading relations by hand.
2016-08-18 14:40:48 -04:00
Toby Lawrence a89ce19171 Use proper relations instead of forcefully loading relations by hand.
Some of the ways comments are accessed in the User model (when a
complete user object is requested) lead to an N+1 situation because
while we preload the related documents (preloading the parent thread of
  a given comment, in this case), further accesses to those comments
  actually never take advantage of the preloaded relations.

We should be using the relation directly, which will still act the same
as before but allow us to actually benefit from preloading.
2016-08-18 14:18:02 -04:00
Toby Lawrence 4b6adbd3a4 Merge branch 'master' into platform/upgrade-to-ruby23 2016-08-11 16:48:02 -04:00
Toby Lawrence bfd866c10f Merge pull request #199 from edx/tests/increase-es-setup-wait
Wait 10s after starting ElasticSearch.
2016-08-11 16:46:13 -04:00
Toby Lawrence 209e7aa731 Wait 10s after starting ElasticSearch.
Now that MongoDB 3.0 seems to download/untar faster than 2.6, we seem to
be right over the line of how quickly ES can start up and be listening
for connections, which leads the tests to try and connect too quickly,
which fails.

By sleeping for 10 seconds after starting ElasticSearch, it's almost a
certainty it will be up and running by the time we try to first connect
to it.
2016-08-11 16:34:30 -04:00
Toby Lawrence 2ed64c976e Merge branch 'master' into platform/upgrade-to-ruby23 2016-08-11 12:11:31 -04:00
Toby Lawrence 008affa6a0 Wait 10s for ES to come online. 2016-08-11 12:11:08 -04:00
Toby Lawrence 71eb3aeef6 Try waiting 10s for ES to come online. 2016-08-11 12:00:49 -04:00
Toby Lawrence 0019f518b5 Switch to 2.3.0 since that's what rbenv currently supports. 2016-08-11 12:00:49 -04:00
Toby Lawrence 922d45fd2c Upgrade to Ruby 2.3.1 2016-08-11 12:00:49 -04:00
Toby Lawrence 5076f2bd1b Merge pull request #197 from edx/test/upgrade-to-mongodb-30
Switch to using MongoDB 3.0 in tests.
2016-08-11 10:08:50 -04:00
Toby Lawrence cd5ae4f307 Merge branch 'master' into test/upgrade-to-mongodb-30 2016-08-10 17:40:24 -04:00
Toby Lawrence dca1d8d3c0 Switch to using MongoDB 3.0 in tests.
Now that we're on MongoDB 3.0 in production, we should also be testing
with MongoDB 3.0.
2016-08-10 16:16:39 -04:00
Robert Raposa 7584dfbd54 Merge pull request #198 from edx/robrap/rack
Add message for rack config load.
2016-08-10 13:31:21 -04:00
Robert Raposa b6e47e8c8c Add message for rack config load. 2016-08-10 12:24:51 -04:00
Robert Raposa 693ed85250 Merge pull request #195 from edx/robrap/fix-newrelic2
Fix new relic traces.
2016-08-10 12:09:43 -04:00
Robert Raposa 1d2eba6a80 Fix new relic traces. 2016-08-10 11:23:02 -04:00
Toby Lawrence 3b9d16738f Merge pull request #194 from edx/revert-es-model
Revert "Replaced Tire with elasticsearch-model"
2016-08-09 15:53:55 -04:00
Toby Lawrence 488fb2e9f8 Revert "Replaced Tire with elasticsearch-model"
This reverts commit 56b61a13ef.
2016-08-09 15:37:16 -04:00
Toby Lawrence 0533199979 Merge pull request #165 from edx/clintonb/replace-tire
Replaced Tire with elasticsearch-model
2016-08-03 11:11:45 -04:00
Toby Lawrence 6d7aec757d Merge branch 'master' into clintonb/replace-tire 2016-08-03 09:54:05 -04:00
Toby Lawrence 17c4c7fd41 Merge pull request #187 from mitodl/blarghmatey/mongoid_settings_update
Updated the Mongoid configuration options
2016-08-01 17:41:57 -04:00
Tobias Macey 1077607dc2 Updated the Mongoid configuration options
Updated the Mongoid configuration so that the read and write modes can
be specified via the `forum_env`.
2016-08-01 14:27:34 -04:00
Toby Lawrence e75d488476 Merge pull request #190 from edx/perf/unnecessary-merges
Reduced merges, do them in place, and reduce allocations.
2016-08-01 14:03:00 -04:00
Toby Lawrence 86fbacf792 Merge branch 'master' into perf/unnecessary-merges 2016-08-01 13:19:34 -04:00
Toby Lawrence d0835ab2e8 Merge branch 'master' into clintonb/replace-tire 2016-08-01 09:48:28 -04:00
Robert Raposa c309a7dee4 Merge pull request #189 from edx/robrap/update-newrelic
update newrelic
2016-07-30 21:35:40 -04:00
Robert Raposa 3eb01ff150 Update new relic agent and fix. 2016-07-29 16:26:21 -04:00
Toby Lawrence c9385b9b8e Reduced merges, do them in place, and reduce allocations.
Primarily, we wanted to reduce the one-thing-per-merge calls, but also,
we want to reduce allocations overall, both from merge calls which will
duplicate the source hash and from string constants sprinkled
throughout.

Seemingly, defining a constant-style word list is not the ticket.  For
whatever reason, Ruby can't seem to figure out the list doesn't change,
and presumably is splating out all of the words and allocating them as
if they were declared right there.  Wahhhh.

Now we're using a straight up one-for-one constant definition of each
string, in a big constants file, where we freeze the strings on the
spot.  We then reference each constant directly at the callsite, which
was the original style and, ultimately, is the best for readability.
2016-07-29 14:31:55 -04:00