Skip to content

Commit 25d68ce

Browse files
committed
COMPASS-387: Handle no global lock data (#681)
* COMPASS-387: Handle no global lock data * COMPASS-387: Adding read/write graph tests
1 parent 1dfd99d commit 25d68ce

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/internal-packages/server-stats/lib/d3/stats-chart.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,10 @@ const graphfunction = function() {
319319
.append('text')
320320
.attr('class', 'legend-linename')
321321
.attr('transform', 'translate(' + 13 + ',' + 9 + ')')
322-
.text(function(d, i) {return data.labels.keys[i]; });
322+
.text(function(d, i) { return data.labels.keys[i]; });
323323
legendDiv
324324
.append('text')
325+
.attr('data-test-id', function(d) { return `performance-${d}`; })
325326
.attr('class', function(d) { return 'legend-count text-' + d;} )
326327
.attr('transform', 'translate(' + 15 + ',22)');
327328

src/internal-packages/server-stats/lib/store/globallock-store.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ const GlobalLockStore = Reflux.createStore({
4343
},
4444

4545
globalLock: function(error, doc, isPaused) {
46+
if (!doc.globalLock) {
47+
error = new Error('no global lock information returned from the serverstatus command');
48+
}
4649
if (!error && doc) {
4750
if (this.starting) {
4851
this.starting = false;

0 commit comments

Comments
 (0)