Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some more storage group tweaks #81

Merged
merged 6 commits into from Mar 3, 2015

Conversation

gwicke
Copy link
Member

@gwicke gwicke commented Mar 3, 2015

No description provided.

d00rman and others added 6 commits March 3, 2015 19:41
The default enforces a bettom-up code style with helpers being grouped before
the meat of a class. Per http://jshint.com/docs/options/#latedef, setting this
option to "nofunc" restricts this warning to variables only, which still
catches typical use-before-define situations (which are fatal in strict mode
anyway).
This entire area is quite hacky, but at least it does share the config for
now.
Storage group handling depends on the configuration and is stateful, so seems
to be better placed in the DB class.

Also:

- Add keyspaceNameCache: hashing is quite expensive, and did show up at around
  1% of total CPU usage in profiling.

- Move `InternalRequest` to the end of the file, so that it doesn't break the
  flow of DB. The previous JSHint config patch makes that possible.

- Make `_buildStorageGroups` side-effect free.

- Optimize deleted row removal. Deletions are fairly rare, so filtering is not
  the fastest option in the common (no deletions) case. The filter function
  accounted for 50% of the time spent in db.js, and around 0.6% of total time.
Coveralls has been quite shaky recently. We don't want to get spurious
failures from a 'nice-to-have' service, so don't depend on it.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.14%) to 88.06% when pulling 20ea285 on gwicke:T91188/storage-groups into 823dda0 on wikimedia:cassandra_driver_v2.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.14%) to 88.06% when pulling 20ea285 on gwicke:T91188/storage-groups into 823dda0 on wikimedia:cassandra_driver_v2.

gwicke added a commit that referenced this pull request Mar 3, 2015
@gwicke gwicke merged commit 764b3e7 into wikimedia:cassandra_driver_v2 Mar 3, 2015
@gwicke gwicke deleted the T91188/storage-groups branch March 3, 2015 21:32
@gwicke
Copy link
Member Author

gwicke commented Mar 3, 2015

Merged, so that we can test on the test cluster & base work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants