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

Add sharding calculator #584

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open

Add sharding calculator #584

wants to merge 45 commits into from

Conversation

SilPan
Copy link

@SilPan SilPan commented Aug 23, 2018

sharding-calculator is finalized.
Joe told us to request someone to look over it.
So it can be thought about, if it should actually be used.

@SilPan SilPan requested a review from m-kharbat August 23, 2018 08:25
Copy link
Contributor

@m-kharbat m-kharbat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add changes.txt entry

}
}
}, {
"name": "testing",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This testing section doesn't seem used, please remove it

// time is measured in hours

angular.module('calculator', ['sql', 'translation']).controller('CalculatorController', function($scope, SQLQuery, queryResultToObjects) {
$scope.diskLoadFactor = 0.85;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only attach the variables that are needed in the HTML view to the $scope. Otherwise it causes poor performance

$scope.selectTable = "none";
$scope.selected = "none";

$scope.selectedRAM = function (){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for the fuctions

var stmt = "select sum(size) from sys.shards where schema_name = '" + schemaName
+ "'and table_name = '"+tableName+"' and primary=true;";
SQLQuery.execute(stmt, {}, false, false, false, false).then(function (query) {
if ((query.rows[0])[0]==null){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use ===

+schemaName+"' and table_name = '"+tableName+"';";
SQLQuery.execute(stmt, {}, false, false, false, false).then(function (query) {
rep = (query.rows[0])[0];
console.log("^^^^^^^^^^^^^^^^^ "+ $scope.replicas);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove console.logs

@@ -0,0 +1,21 @@
<div ng-app="testing" ng-controller="testingController">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove testing.html

@@ -0,0 +1,42 @@
'use strict';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this file if not

leo added 6 commits August 27, 2018 10:22
@amotl amotl changed the title Floyd/calculator Add sharding calculator Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants