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 minor issue fixs found during release check #365

Merged
merged 4 commits into from Dec 26, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .vscodeignore
Expand Up @@ -8,6 +8,7 @@ azure-pipelines.yml
.lintstagedrc
.gitignore
.npmignore
.dockerignore
Dockerfile
__blobstorage__
typings
Expand Down
4 changes: 1 addition & 3 deletions BreakingChanges.md
Expand Up @@ -6,11 +6,9 @@

- [Breaking] By default Azurite will block requests with unsupported headers or parameters which may impact data integrity.
- Skip this by switching to loose mode by Azurite configuration parameter `--loose`.
- [Breaking] Apply `LokiFsStructuredAdapter` as default blob metadata loki adapter to improve performance.
- This version cannot guarantee compatible with persisted database models file by previous version. Remove previous metadata file and restart Azurite in case any errors.
- [Breaking] Azurite updates underline metadata schema which does not compatible with previous versions.
- This version cannot guarantee compatible with persisted database models file by previous version. Remove previous metadata file and restart Azurite in case any errors.

## 2019.11 Version 3.3.0-preview

- [Breaking] This version cannot guarantee compatible with persisted database models file by previous version. Remove previous metadata file and restart Azurite in case any errors.
- [Breaking] This version cannot guarantee compatible with persisted database models file by previous version. Remove previous metadata file and restart Azurite in case any errors.
4 changes: 1 addition & 3 deletions ChangeLog.md
Expand Up @@ -14,8 +14,6 @@

Blob:

- [Breaking] Apply `LokiFsStructuredAdapter` as default blob metadata loki adapter to improve performance.
- This version cannot guarantee compatible with persisted database models file by previous version. Remove previous metadata file and restart Azurite in case any errors.
- [Breaking] Azurite updates underline metadata schema which does not compatible with previous versions.
- This version cannot guarantee compatible with persisted database models file by previous version. Remove previous metadata file and restart Azurite in case any errors.
- List blocks will filter the returned block list with input BlockListingFilter.
Expand Down Expand Up @@ -43,7 +41,7 @@ Queue:

- AllowedHeaders and ExposedHeaders are optional now when setting CORS.
- Fix Put message fail with max messagettl.
- Updated message size calculation when checking 64KB limitation.
- Updated message size calculation when checking 64KB limitation.

## 2019.11 Version 3.3.0-preview

Expand Down
8 changes: 0 additions & 8 deletions src/blob/persistence/LokiBlobMetadataStore.ts
Expand Up @@ -7,7 +7,6 @@ import {
convertDateTimeStringMsTo7Digital,
rimrafAsync
} from "../../common/utils/utils";
import { lfsa } from "../../common/utils/utils";
import StorageErrorFactory from "../errors/StorageErrorFactory";
import * as Models from "../generated/artifacts/models";
import { LeaseStatusType } from "../generated/artifacts/models";
Expand Down Expand Up @@ -100,7 +99,6 @@ export default class LokiBlobMetadataStore

public constructor(public readonly lokiDBPath: string) {
this.db = new Loki(lokiDBPath, {
adapter: new lfsa(),
autosave: true,
autosaveInterval: 5000
});
Expand Down Expand Up @@ -209,12 +207,6 @@ export default class LokiBlobMetadataStore
if (this.isClosed()) {
await rimrafAsync(this.lokiDBPath);

// Remove separate metadata collection json files generated by LokiFsStructuredAdapter
const searchScope = 20; // Should be larger than number of collections for every loki database
for (let i = 0; i < searchScope; i++) {
await rimrafAsync(`${this.lokiDBPath}.${i}`);
}

return;
}
throw new Error(`Cannot clean LokiBlobMetadataStore, it's not closed.`);
Expand Down
7 changes: 7 additions & 0 deletions src/blob/persistence/SqlBlobMetadataStore.ts
Expand Up @@ -103,6 +103,13 @@ export default class SqlBlobMetadataStore implements IBlobMetadataStore {
connectionURI: string,
sequelizeOptions?: SequelizeOptions
) {
// Enable encrypt connection for SQL Server
if (connectionURI.startsWith("mssql") && sequelizeOptions) {
sequelizeOptions.dialectOptions = sequelizeOptions.dialectOptions || {};
(sequelizeOptions.dialectOptions as any).options =
(sequelizeOptions.dialectOptions as any).options || {};
(sequelizeOptions.dialectOptions as any).options.encrypt = true;
}
this.sequelize = new Sequelize(connectionURI, sequelizeOptions);
}

Expand Down
7 changes: 7 additions & 0 deletions src/common/persistence/SqlExtentMetadataStore.ts
Expand Up @@ -36,6 +36,13 @@ export default class SqlExtentMetadataStore implements IExtentMetadataStore {
connectionURI: string,
sequelizeOptions?: SequelizeOptions
) {
// Enable encrypt connection for SQL Server
if (connectionURI.startsWith("mssql") && sequelizeOptions) {
sequelizeOptions.dialectOptions = sequelizeOptions.dialectOptions || {};
(sequelizeOptions.dialectOptions as any).options =
(sequelizeOptions.dialectOptions as any).options || {};
(sequelizeOptions.dialectOptions as any).options.encrypt = true;
}
this.sequelize = new Sequelize(connectionURI, sequelizeOptions);
}

Expand Down