Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
5bccaa64
Commit
5bccaa64
authored
Apr 05, 2018
by
Ashutosh Mestry
Committed by
Madhan Neethiraj
Apr 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-2460: fix for regression in handling HA mode
Signed-off-by:
Madhan Neethiraj
<
madhan@apache.org
>
parent
519314f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
13 deletions
+1
-13
ActiveServerFilter.java
...java/org/apache/atlas/web/filters/ActiveServerFilter.java
+0
-8
ServiceState.java
.../main/java/org/apache/atlas/web/service/ServiceState.java
+1
-5
No files found.
webapp/src/main/java/org/apache/atlas/web/filters/ActiveServerFilter.java
View file @
5bccaa64
...
@@ -87,14 +87,6 @@ public class ActiveServerFilter implements Filter {
...
@@ -87,14 +87,6 @@ public class ActiveServerFilter implements Filter {
HttpServletResponse
httpServletResponse
=
(
HttpServletResponse
)
servletResponse
;
HttpServletResponse
httpServletResponse
=
(
HttpServletResponse
)
servletResponse
;
LOG
.
error
(
"Instance in transition. Service may not be ready to return a result"
);
LOG
.
error
(
"Instance in transition. Service may not be ready to return a result"
);
httpServletResponse
.
sendError
(
HttpServletResponse
.
SC_SERVICE_UNAVAILABLE
);
httpServletResponse
.
sendError
(
HttpServletResponse
.
SC_SERVICE_UNAVAILABLE
);
}
if
(
serviceState
.
isInstanceInMigration
())
{
HttpServletResponse
httpServletResponse
=
(
HttpServletResponse
)
servletResponse
;
LOG
.
error
(
"Instance in migration. Service may not be ready to return a result"
);
httpServletResponse
.
sendError
(
HttpServletResponse
.
SC_SERVICE_UNAVAILABLE
);
}
if
(
serviceState
.
isInstanceInMigration
())
{
HttpServletResponse
httpServletResponse
=
(
HttpServletResponse
)
servletResponse
;
LOG
.
error
(
"Instance in migration. Service may not be ready to return a result"
);
httpServletResponse
.
sendError
(
HttpServletResponse
.
SC_SERVICE_UNAVAILABLE
);
}
else
if
(
serviceState
.
isInstanceInMigration
())
{
}
else
if
(
serviceState
.
isInstanceInMigration
())
{
HttpServletResponse
httpServletResponse
=
(
HttpServletResponse
)
servletResponse
;
HttpServletResponse
httpServletResponse
=
(
HttpServletResponse
)
servletResponse
;
LOG
.
error
(
"Instance in migration. Service may not be ready to return a result"
);
LOG
.
error
(
"Instance in migration. Service may not be ready to return a result"
);
...
...
webapp/src/main/java/org/apache/atlas/web/service/ServiceState.java
View file @
5bccaa64
...
@@ -61,11 +61,7 @@ public class ServiceState {
...
@@ -61,11 +61,7 @@ public class ServiceState {
public
ServiceState
(
Configuration
configuration
)
{
public
ServiceState
(
Configuration
configuration
)
{
this
.
configuration
=
configuration
;
this
.
configuration
=
configuration
;
if
(
StringUtils
.
isNotEmpty
(
configuration
.
getString
(
ATLAS_MIGRATION_MODE_FILENAME
)))
{
state
=
!
HAConfiguration
.
isHAEnabled
(
configuration
)
?
ServiceStateValue
.
ACTIVE
:
ServiceStateValue
.
PASSIVE
;
state
=
ServiceStateValue
.
MIGRATING
;
}
else
{
state
=
!
HAConfiguration
.
isHAEnabled
(
configuration
)
?
ServiceStateValue
.
ACTIVE
:
ServiceStateValue
.
PASSIVE
;
}
if
(!
StringUtils
.
isEmpty
(
configuration
.
getString
(
ATLAS_MIGRATION_MODE_FILENAME
,
""
)))
{
if
(!
StringUtils
.
isEmpty
(
configuration
.
getString
(
ATLAS_MIGRATION_MODE_FILENAME
,
""
)))
{
state
=
ServiceStateValue
.
MIGRATING
;
state
=
ServiceStateValue
.
MIGRATING
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment