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

Log information about index version during startup #9777

Merged
merged 2 commits into from
Apr 26, 2018
Merged

Conversation

e-dard
Copy link
Contributor

@e-dard e-dard commented Apr 25, 2018

Contributes to #9707.

This PR adds two new useful things to the logs:

  1. During startup the index type in use for a shard will be logged when the shard is opened, using the index_version key. The two types available are: {"inmem", "tsi1"}.
  2. The TSDB store will track all the different index types for all shards within all databases. Then, it will determine if there exist shards within a database that are running differing indexes, and log the frequency of each index type as a warning.

An example of the new logs (including a database with mixed index types) is as follows:

...
...
2018-04-25T12:56:53.953773Z	info	Opened shard	{"log_id": "07gDtm50000", "service": "store", "trace_id": "07gDtmVW000", "op_name": "tsdb_open", "index_version": "tsi1", "path": "/Users/edd/.influxdb/data/_internal/monitor/1", "duration": "27.234ms"}
2018-04-25T12:56:53.955287Z	info	Opened shard	{"log_id": "07gDtm50000", "service": "store", "trace_id": "07gDtmVW000", "op_name": "tsdb_open", "index_version": "tsi1", "path": "/Users/edd/.influxdb/data/fooo/autogen/8", "duration": "20.021ms"}
2018-04-25T12:56:54.144353Z	info	Opened shard	{"log_id": "07gDtm50000", "service": "store", "trace_id": "07gDtmVW000", "op_name": "tsdb_open", "index_version": "inmem", "path": "/Users/edd/.influxdb/data/_internal/monitor/7", "duration": "253.250ms"}
2018-04-25T12:56:54.319992Z	info	Opened shard	{"log_id": "07gDtm50000", "service": "store", "trace_id": "07gDtmVW000", "op_name": "tsdb_open", "index_version": "inmem", "path": "/Users/edd/.influxdb/data/_internal/monitor/6", "duration": "428.724ms"}
2018-04-25T12:56:54.320059Z	warn	Mixed shard index types	{"log_id": "07gDtm50000", "service": "store", "inmem_count": 2, "tsi1_count": 1, "db_instance": "_internal"}
2018-04-25T12:56:54.320250Z	info	Open store (end)	{"log_id": "07gDtm50000", "service": "store", "trace_id": "07gDtmVW000", "op_name": "tsdb_open", "op_event": "end", "op_elapsed": "433.798ms"}
2018-04-25T12:56:54.320277Z	info	Opened service	{"log_id": "07gDtm50000", "service": "subscriber"}
2018-04-25T12:56:54.320285Z	info	Starting monitor service	{"log_id": "07gDtm50000", "service": "monitor"}
2018-04-25T12:56:54.320292Z	info	Registered diagnostics client	{"log_id": "07gDtm50000", "service": "monitor", "name": "build"}
...
...

@ghost ghost assigned e-dard Apr 25, 2018
@ghost ghost added the review label Apr 25, 2018
Copy link
Contributor

@stuartcarnie stuartcarnie left a comment

Choose a reason for hiding this comment

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

👌🏻

@e-dard e-dard merged commit ba16268 into master Apr 26, 2018
@ghost ghost removed the review label Apr 26, 2018
@e-dard e-dard deleted the er-index-log branch April 26, 2018 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants