Schema changes on sharded database

I have performance issues with one particulary large table, 500+ Million rows, 300Gb data, Postgres 10.5. It is already partitioned. I am working on optimising it here and there, but that is not trivial and only provides small improvements. Table is constanlty growing and we expect our userbase increace significantly so I need a way to scale up.

I want to use multi-tenant sharding approach. X tenants per shard. Shard resolving on app layer. Most of tenants have relateively small datasets, but few are huge and I want to be able to place them to separate shards . To do that I need lookup tables. Cross-shard queries are not concern at all, naturaly we have almost all of our queris per tenant, so all the data for the tenant will sit in same shard.

I will be using logical sharding, 4 phisical shards x32 logical (that is twice more shards than partitions currenly). Each logical shard is separate database. In most tutorials/talks people seem to use schemas instead of databases. Why? Databases are more isolated, and when moving single tenant or virtual shard to other location it does not seem to have any difference. So db looks like a better candidate to me.

Drawbacks look acceptable: update existing code (significantly), app should be shard aware

The question is: How do I handle migrations(schema changes)?

As first step I will have to create 128 databases, ensuring all of them have all tables, indexes, etc. I also want each of dbs have its own sequences to have ids unique accross all shards. Not trivial to me.

But further changes are problem aswell. Do I just iterate all connections and aplly changes? Is there a better (maybe async) way? What do I do if at some point shema in one shard is different from another.

If Oathbreaker Paladin with Warlock-Magic Initiate changes to Conquest Paladin, should his Magic Initiate Class also change? [on hold]

If I was an Oathbreaker Paladin who also took the Magic Initiate feat as a Warlock and then reformed into a different type of Paladin (Conquest, devotion, etc) could I potentially change the class of magic initiate?

I know it’s up to the DM, but logically would that make sense? My character is trying to reform from his evil ways, and getting powers from an evil source might not continue to make the most sense.

Modifying WebPartPage in SharePoint Online changes ContentType property

I am using the SharePoint Online CSOM library to change an ImageLink property in a WebPartPage. I first check-out the page, make any changes, and then check-in the page. When I check-in the page, the page’s content type shown in SharePoint Online changes from “Web Part Page” to “Wiki Page”. If I re-read the page, the ListItem’s ContentType field is indeed set to a Wiki page ID (“0x0101080091497901794A9E4E8282666A11DAE0AD”). I’m stumped as to what is causing this.

Here’s my C# code:

using (SP.ClientContext context = SharePoint.GetClientContext(site.Url, siteCollection)) {     string serverRelativeUrl = site.GetServerRelativeUrl(url);     SP.File csomFile = context.Web.GetFileByServerRelativeUrl(serverRelativeUrl);     context.Load(csomFile);     context.ExecuteQueryWithRetry();      LimitedWebPartManager limitedWebPartManager = csomFile.GetLimitedWebPartManager(PersonalizationScope.Shared);     context.Load(limitedWebPartManager);     WebPartDefinitionCollection webPartDefinitionCollection = limitedWebPartManager.WebParts;     context.Load(webPartDefinitionCollection, wpdc => wpdc.Include(         wpd => wpd.Id,         wpd => wpd.WebPart,         wpd => wpd.WebPart.Properties));     context.ExecuteQueryWithRetry();      bool pageChanged = false;     bool webPartChanged = false;     foreach (WebPartDefinition wpd in webPartDefinitionCollection)     {         string imageLinkUrl = wpd.WebPart.Properties.GetField<string>(@"ImageLink");         if (!String.IsNullOrEmpty(imageLinkUrl))         {             bool linkChanged = LinkHandler(ref imageLinkUrl);             if (linkChanged)             {                 wpd.WebPart.Properties[@"ImageLink"] = imageLinkUrl;                 webPartChanged = true;             }         }          if (webPartChanged)         {             wpd.SaveWebPartChanges();             pageChanged = true;         }     }      if (pageChanged)     {         context.ExecuteQueryWithRetry();     } }  

Webpage isn’t updating changes unless I restart apache2

I’ve been searching for a solution to this problem for a very long time now and I just can’t seem to figure it out.

I’ve installed apache2 and mysql and php7.0 on a fresh install of ubuntu yet the problem stil persists.

Just trying to create an ideal web development environment. The process goes as follows: 1) start apache2 && mysql 2) make changes to my index.php file in /var/www/html 3) check my ip using ifconfig and then go to that adress 4) notice my changes haven’t taken place!! 5) restart apache2 6) refresh my page and realize that the changes have been made

Why wont apache2 recognize changes made without having to completely restart the service everytime???

MySQL 5.6 row format changes when changing storage engine from MyISAM to InnoDB

I am testing an upgrade of all existing MySQL 5.6 tables from MyISAM to InnoDB. I converted all row formats to ‘dynamic’ first for all the tables to be on Barracuda then running “alter table engine = InnoDB” for 16 tables. 12 of the 16 tables changed file formats as well without an alter table command. I am at a loss to understand this. I think this may be related to the .frm files, but I’m not sure how. I’ve checked environment variables:

innodb_file_format is showing Barracuda

innodb_file_format_check is ON

A couple of the tables: Articletranslations is showing as compressed, pubmedabstractauthors and pubmedtranslated are showing as compact. The create table statements from tables that I had changed to dynamic file format before changing the storage engine to InnoDB.

Table: articletranslations

Create Table: CREATE TABLE `articletranslations` (   `TranslationID` int(11) NOT NULL AUTO_INCREMENT,   `ArticleID` int(11) NOT NULL,   `language` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,   `TextContent` longtext COLLATE utf8_unicode_ci,   `Name` text COLLATE utf8_unicode_ci,   `Tags` varchar(1000) COLLATE utf8_unicode_ci DEFAULT NULL,   `Detail_Abstract` longtext COLLATE utf8_unicode_ci,   `Disclosures` varchar(2000) COLLATE utf8_unicode_ci DEFAULT NULL,   `Discussion` longtext COLLATE utf8_unicode_ci,   `Acknowledgements` longtext COLLATE utf8_unicode_ci,   `D` longtext COLLATE utf8_unicode_ci,   `Materials` text COLLATE utf8_unicode_ci,   `HTMLTopContent` text COLLATE utf8_unicode_ci,   `Rep_Results` longtext COLLATE utf8_unicode_ci,   `Introduction` text COLLATE utf8_unicode_ci,   `IsMachine` tinyint(1) NOT NULL DEFAULT '1',   `DateTranslated` datetime DEFAULT CURRENT_TIMESTAMP,   PRIMARY KEY (`TranslationID`),   KEY `ArticleTranslations_Language_ArticleID` (`language`,`ArticleID`),   KEY `ArticleTranslations_ArticleID` (`ArticleID`) ) ENGINE=InnoDB AUTO_INCREMENT=177437 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPRESSED 

Table: pubmedabstractauthors

Create Table: CREATE TABLE `pubmedabstractauthors` (   `AuthorID` int(11) NOT NULL AUTO_INCREMENT,   `ForeName` varchar(255) NOT NULL,   `LastName` varchar(255) NOT NULL,   `Initials` varchar(255) NOT NULL,   PRIMARY KEY (`AuthorID`),   KEY `names` (`ForeName`,`LastName`,`Initials`) ) ENGINE=InnoDB AUTO_INCREMENT=712515 DEFAULT CHARSET=latin1 

Table: pubmedtranslated

Create Table: CREATE TABLE `pubmedtranslated` (   `PMID` int(11) NOT NULL,   `ArticleTitle` text COLLATE utf8_unicode_ci NOT NULL,   `ArticleAbstract` text COLLATE utf8_unicode_ci NOT NULL,   `LanguageID` smallint(6) NOT NULL,   PRIMARY KEY (`PMID`,`LanguageID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci 

Ubuntu partition changes not showing in Windows 10

I have just done a fresh install of Ubuntu 18.04 from a boot stick I have made. I have done several different installs now, one where I manage the partitions myself, and other where I let the ubuntu installer do the work.

No matter how I do it, when it finishes installing, it runs fine. However, when I go back into windows and go into the partition manager the space shows as unallocated as seen in the screenshot:

Windows Partition

If I make ANY changes in windows to the partition scheme the ubuntu installation disappears. What I am trying to do is have a Windows OS partition, an Ubuntu one, and then a shared NTFS files partition.

Additionally, when I first tried installing I had a 100GB data partition as well as the ones shown in the image. In the ubuntu installer I increased it to 200GB and again when I went back into windows there were no shown changes in Windows Partition Manager despite Ubuntu showing this.

The Windows install is very fresh too so it may be I am missing some drivers, but just seems odd that Ubuntu reads different partitions to Windows since surely it just involves reading the MBR? Any troubleshooting tips would be really appreciated.

Ubuntu changes line itself while typing with the built-in Keyboard

Ubuntu community,

I have a really disgusting trouble while typing with built-in keyboard on Ubuntu 16.04.06 LTS, the problem is that (I do not know why)while I am typing the line changes or it just delete everything and a lot of weird things, I re-installed the software, update it and nothing worked.

Have you any idea? help please.

Best regards, Santiago