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

[IOTDB-872] Use system timezone in CLI (Session) #1846

Merged
merged 16 commits into from
Oct 29, 2020
Merged

Conversation

Alima777
Copy link
Contributor

@Alima777 Alima777 commented Oct 22, 2020

Remove the default timezone in server side.
Using the system default time zone of each client to decide the time zone of server operation.

@HTHou HTHou requested a review from liutaohua October 23, 2020 02:16
@HTHou HTHou added the rel/0.11 label Oct 26, 2020
}
RpcUtils.verifySuccess(resp.getStatus());
return resp.getTimeZone();
return ZoneId.systemDefault().getId();
Copy link
Contributor

Choose a reason for hiding this comment

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

There is something wrong with the logic.
It should be the default value that the server stores when the client is not registered with the server.

}

private synchronized void setTimeZone(String zoneId)
public synchronized void setTimeZone(String zoneId)
throws StatementExecutionException, IoTDBConnectionException {
TSSetTimeZoneReq req = new TSSetTimeZoneReq(sessionId, zoneId);
TSStatus resp;
Copy link
Contributor

Choose a reason for hiding this comment

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

There may be a bug here, because the value stored by the server does not necessarily change when an error is encountered, but the local cached zoneId does

@HTHou
Copy link
Contributor

HTHou commented Oct 28, 2020

Consider add some setting timezone tests in SessionTest or SessionPoolTest?

@Alima777
Copy link
Contributor Author

Consider add some setting timezone tests in SessionTest or SessionPoolTest?

Added~

Copy link
Contributor

@HTHou HTHou left a comment

Choose a reason for hiding this comment

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

LGTM

@HTHou HTHou merged commit 699998f into apache:master Oct 29, 2020
@Alima777 Alima777 deleted the timezone branch December 2, 2020 11:32
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